using System; using System.Collections.Generic; using System.Linq; using System.Web; using EnVisage.Models; namespace EnVisage.Code.BLL { public class ContactManager : ManagerBase { public ContactManager(EnVisageEntities dbContext) : base(dbContext) { } protected override Contact InitInstance() { return new Contact { Id = Guid.NewGuid() }; } protected override Contact RetrieveReadOnlyById(Guid key) { return DataTable.AsNoTracking().FirstOrDefault(t => t.Id == key); } public override System.Data.Entity.DbSet DataTable { get { return DbContext.Contacts; } } } }