public async Task <IActionResult> PutPlaceConverter(int id, PlaceConverter placeConverter) { if (id != placeConverter.PlaceConverterId) { return(BadRequest()); } _context.Entry(placeConverter).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!PlaceConverterExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutMain(int id, Main main) { if (id != main.MainId) { return(BadRequest()); } _context.Entry(main).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!MainExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }