public async Task <IActionResult> PutCarrier(int id, Carrier carrier) { if (id != carrier.Id) { return(BadRequest()); } _context.Entry(carrier).State = EntityState.Modified; await _context.SaveChangesAsync(); return(NoContent()); }
public void Update(TEntity entity) { Db.Entry(entity).State = EntityState.Modified; Db.SaveChanges(); }