Design pattern for ASP.NET MVC 3 application using repository pattern
Below is an example of how I typically implement the repository pattern in an ASP.NET MVC 3 project when using Entity Framework. Model (Address.cs) [Bind(Include = “Id,Address”)] [MetadataType(typeof(Address_Validation))] public partial class Address {} public class Address_Validation { //validation here } Repository Interface (IAddressRepository.cs) public interface IAddressRepository { void Delete(Address u); void Save(); void Add(Address b); …
Design pattern for ASP.NET MVC 3 application using repository pattern Read More »