public IHttpActionResult PutThrowType(int id, ThrowTypeDto dto) { if (id != dto.Id) { return BadRequest(); } _metadataService.Update<ThrowType, ThrowTypeDto>(id, dto); return StatusCode(HttpStatusCode.NoContent); }
public IHttpActionResult PostThrowType(ThrowTypeDto dto) { var newDto = _metadataService.Add<ThrowType, ThrowTypeDto>(dto); return CreatedAtRoute("DefaultApi", new { controller = "ThrowTypes", id = newDto.Id }, newDto); }