public async Task <IActionResult> PutSeller([FromRoute] int id, [FromBody] Seller seller) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (id != seller.Id) { return(BadRequest()); } _context.Entry(seller).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!SellerExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }