public async Task <IActionResult> Post([FromBody] TViewModel viewModel) { _logger.LogTrace(LogEventId, AwesomeMethods.ConvertDataForLog(viewModel, _converter)); var model = Mapper.Map <TModel>(viewModel); _repository.Add(model); if (await _repository.Save()) { _logger.LogInformation(LogEventId, $"SAVED : ID ({model.Id})"); return(CreatedAtAction("Get", new { id = model.Id }, _response .AddInfo(_localizer["Saved"]) .AddData(Mapper.Map <TViewModel>(model)) .Get())); } else { _logger.LogWarning(LogEventId, "NOT SAVED"); return(NoContent()); } }