public IActionResult PostAward([FromBody] AwardModel awardModel) { _logger.LogInformation($"{nameof(AwardController)} : {nameof(PostAward)} was called."); try { if (awardModel == null) { return(BadRequest("Award is required")); } if (_awardService.FindById(awardModel.Id) != null) { return(Conflict("Award already exists")); } _awardService.Create(awardModel); _awardService.Save(); return(Ok(awardModel)); } catch (DbException exception) { _logger.LogError(exception.Message); return(BadRequest(exception.Message)); } catch (Exception exception) { _logger.LogError(exception.Message); throw; } }