How does my C# MVC project setup look?
I am new to C# and MVC.  I have read a few books and spent time on this site reading Q&A on various topics.  I have a test project up and running to get the basics down that queries out a list of Groups and returns them to a simple View.   I like the idea of the Repository pattern and have taken a stab at implementing that.  A few notes...  For now, I am not using EF or Linq2Sql but maybe in the future.   I am not sure if I will keep my using statements in the GroupRepository or add some Dispose statements via a Try/Catch/Finally as I need a way to manage exceptions anyway.  

Just wanted some advice/critique on my current setup as I continue learning.

**Base.cs**

    namespace Test.Models
    {
        public class Base : IDisposable
        {
            protected string Connection
            {
                get
                {
                    return System.Configuration.ConfigurationManager.ConnectionStrings["TestDB"].ConnectionString;
                }
            }
        }
    }

**Group.cs**
    
    namespace Test.Models
    {
        public class Group
        {
            public int ID { get; set; }
            public string Name { get; set; }
            public bool IsActive { get; set; }
            public DateTime Created { get; set; }
        }
    }

**GroupRepository.cs**

    namespace Test.Models
    {
        public class GroupRepository : Base, IGroupRepository
        {
    
            public List<Group> GetAllGroups()
            {
                List<Group> groups = new List<Group>();
                SqlDataReader reader;
    
                using (SqlConnection conn = new SqlConnection(Connection))
                using (SqlCommand cmd = new SqlCommand("GetAllGroups", conn))
                {
                    
                    cmd.CommandType = System.Data.CommandType.StoredProcedure;
                    conn.Open();
                    reader = cmd.ExecuteReader();
    
                    while (reader.Read())
                    {
                        Group group = new Group();
                        group.ID = reader.GetInt32(0);
                        group.Name = reader.GetString(1);
                        group.IsActive = reader.GetBoolean(2);
                        group.Created = reader.GetDateTime(3);
                        groups.Add(group);
                    }
    
                }
    
                return groups;
            }
        }
    }

**IGroupRepository.cs**
    
    namespace Test.Models
    {
        public interface IGroupRepository
        {
            List<Group> GetAllGroups();
        }
    }

**GroupController**

    namespace Test.Controllers
    {
        public class GroupController : Controller
        {
    
            private IGroupRepository _repository;
    
            public GroupController() : this(new GroupRepository()) 
            { 
            }
    
            public GroupController(IGroupRepository repository)
            {
                _repository = repository;
            }
    
            public ActionResult Index()
            {
                return View(_repository.GetAllGroups());
            }
    
        }
    }

**View**

    @model IEnumerable<Test.Models.Group>
    
    @{
        ViewBag.Title = "Group List";
    }
    
    
    
    <table>
    
    @foreach (var item in Model) {
        <tr>
            <td>
                @item.ID
            </td>
            <td>
                @item.Name
            </td>
            <td>
                @item.IsActive
            </td>
            <td>
                @item.Created
            </td>
        </tr>
    }
    
    </table>

Thanks All!
How does my C# MVC project setup look?
===

I am new to C# and MVC.  I have read a few books and spent time on this site reading Q&A on various topics.  I have a test project up and running to get the basics down that queries out a list of Groups and returns them to a simple View.   I like the idea of the Repository pattern and have taken a stab at implementing that.  A few notes...  For now, I am not using EF or Linq2Sql but maybe in the future.   I am not sure if I will keep my using statements in the GroupRepository or add some Dispose statements via a Try/Catch/Finally as I need a way to manage exceptions anyway.  

Just wanted some advice/critique on my current setup as I continue learning.

**Base.cs**

    namespace Test.Models
    {
        public class Base : IDisposable
        {
            protected string Connection
            {
                get
                {
                    return System.Configuration.ConfigurationManager.ConnectionStrings["TestDB"].ConnectionString;
                }
            }
        }
    }

**Group.cs**
    
    namespace Test.Models
    {
        public class Group
        {
            public int ID { get; set; }
            public string Name { get; set; }
            public bool IsActive { get; set; }
            public DateTime Created { get; set; }
        }
    }

**GroupRepository.cs**

    namespace Test.Models
    {
        public class GroupRepository : Base, IGroupRepository
        {
    
            public List<Group> GetAllGroups()
            {
                List<Group> groups = new List<Group>();
                SqlDataReader reader;
    
                using (SqlConnection conn = new SqlConnection(Connection))
                using (SqlCommand cmd = new SqlCommand("GetAllGroups", conn))
                {
                    
                    cmd.CommandType = System.Data.CommandType.StoredProcedure;
                    conn.Open();
                    reader = cmd.ExecuteReader();
    
                    while (reader.Read())
                    {
                        Group group = new Group();
                        group.ID = reader.GetInt32(0);
                        group.Name = reader.GetString(1);
                        group.IsActive = reader.GetBoolean(2);
                        group.Created = reader.GetDateTime(3);
                        groups.Add(group);
                    }
    
                }
    
                return groups;
            }
        }
    }

**IGroupRepository.cs**
    
    namespace Test.Models
    {
        public interface IGroupRepository
        {
            List<Group> GetAllGroups();
        }
    }

**GroupController**

    namespace Test.Controllers
    {
        public class GroupController : Controller
        {
    
            private IGroupRepository _repository;
    
            public GroupController() : this(new GroupRepository()) 
            { 
            }
    
            public GroupController(IGroupRepository repository)
            {
                _repository = repository;
            }
    
            public ActionResult Index()
            {
                return View(_repository.GetAllGroups());
            }
    
        }
    }

**View**

    @model IEnumerable<Test.Models.Group>
    
    @{
        ViewBag.Title = "Group List";
    }
    
    
    
    <table>
    
    @foreach (var item in Model) {
        <tr>
            <td>
                @item.ID
            </td>
            <td>
                @item.Name
            </td>
            <td>
                @item.IsActive
            </td>
            <td>
                @item.Created
            </td>
        </tr>
    }
    
    </table>

Thanks All!