public ActionResult Post([FromBody] CategoryWriteDto finishWriteDto) { ResultWrapper <CategoryReadDto> result = _service.AddElement(finishWriteDto); ModelState.UpdateErrors(result.GetErrors()); if (!ModelState.IsValid) { return(BadRequest(ModelState)); } return(Created($"api/categories/{result.GetResult().Id}", result.GetResult())); }