public virtual void Update(T item) { if (item == null) { throw new ArgumentNullException("item"); } _dbContext.Entry(item).State = EntityState.Modified; }
public async Task <bool> UpdateAsync(Account account) { _context.Accounts.Attach(account); _context.Entry(account).State = EntityState.Modified; try { return(await _context.SaveChangesAsync() > 0 ? true : false); } catch (Exception) { } return(false); }