public async Task <ActionResult <BoroughLibrarys> > PostBoroughLibrarys(BoroughLibrarys boroughLibrarys) { _context.BoroughLibrarys.Add(boroughLibrarys); await _context.SaveChangesAsync(); return(CreatedAtAction("GetBoroughLibrarys", new { id = boroughLibrarys.LibraryId }, boroughLibrarys)); }
public async Task <IActionResult> PutBoroughLibrarys(int id, BoroughLibrarys boroughLibrarys) { if (id != boroughLibrarys.LibraryId) { return(BadRequest()); } _context.Entry(boroughLibrarys).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!BoroughLibrarysExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }