public List <T> GetAll() { using (DVDRentEntities context = new DVDRentEntities()) { return(context.Set <T>().ToList()); } }
public int GetCount() { using (DVDRentEntities context = new DVDRentEntities()) { return(context.Set <T>().Count()); } }
public List <Customer> Get() { using (DVDRentEntities context = new DVDRentEntities()) { return(context.Set <Customer>().ToList()); } }
public void Insert(T entity) { using (DVDRentEntities context = new DVDRentEntities()) { context.Set <T>().Add(entity); context.SaveChanges(); } }