public async Task <IActionResult> PutClients(int id, Clients clients) { if (id != clients.ClientId) { return(BadRequest()); } _context.Entry(clients).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ClientsExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutVideo(int id, Video video) { if (id != video.VId) { return(BadRequest()); } _context.Entry(video).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!VideoExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }