public async Task <IActionResult> PutTokyoWgbList([FromRoute] int id, [FromBody] TokyoWgbList tokyoWgbList) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (id != tokyoWgbList.TokyoWgbListId) { return(BadRequest()); } _context.Entry(tokyoWgbList).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!TokyoWgbListExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PostTokyoWgbList([FromBody] TokyoWgbList tokyoWgbList) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } _context.TokyoWgbLists.Add(tokyoWgbList); await _context.SaveChangesAsync(); return(CreatedAtAction("GetTokyoWgbList", new { id = tokyoWgbList.TokyoWgbListId }, tokyoWgbList)); }