public virtual async Task <T> Update(T obj) { _context.Entry(obj).State = EntityState.Modified; await _context.SaveChangesAsync(); return(obj); }
public virtual async Task <bool> Update(T obj) { _context.Entry(obj).State = Microsoft.EntityFrameworkCore.EntityState.Modified; return(await _context.SaveChangesAsync() > 0); }
public async Task Update(Employee dbItem) { _context.Entry(dbItem).State = EntityState.Modified; await _context.SaveChangesAsync(); }