public async Task<ActionResult<LakeTileColor>> PostLakeTileColor(LakeTileColor lakeTileColor) { _context.LakeTileColor.Add(lakeTileColor); await _context.SaveChangesAsync(); return CreatedAtAction("GetLakeTileColor", new { id = lakeTileColor.LakeTileColorId }, lakeTileColor); }
public async Task<IActionResult> PutLakeTileColor(Guid id, LakeTileColor lakeTileColor) { if (id != lakeTileColor.LakeTileColorId) { return BadRequest(); } _context.Entry(lakeTileColor).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!LakeTileColorExists(id)) { return NotFound(); } else { throw; } } return NoContent(); }