public int Update(T entity) { using (var dbContext = new IluminaContext()) { dbContext.Entry(entity).State = EntityState.Modified; return(dbContext.SaveChanges()); } }
public int Insert(T entity) { using (var dbContext = new IluminaContext()) { dbContext.Entry(entity).State = EntityState.Added; return(dbContext.SaveChanges()); } }