public async Task <IActionResult> Add([FromBody] TemplateEditDto model) { if (!ModelState.IsValid) { return(BadRequest(this.GetErrors(model))); } OperationResult result = await _service.Add(model); if (result.HasError) { return(this.Unprocessable(result)); } return(Ok(result)); }