public T Get(int ID) { using (_context = new FinalExameDbContext()) { return(_context.Set <T>().Find(ID)); } }
public void Update(params T[] items) { using (_context = new FinalExameDbContext()) { foreach (var item in items) { _context.Entry <T>(item).State = EntityState.Modified; } _context.SaveChanges(); } }