예제 #1
0
        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());
        }
예제 #2
0
 public void Update(TEntity entity)
 {
     Db.Entry(entity).State = EntityState.Modified;
     Db.SaveChanges();
 }