public async Task <ActionResult> AddConsultant([FromBody] AddConsultantViewModel model) { if (!ModelState.IsValid) { logger.LogInformation("Method consultants/addconsultant called "); return(BadRequest(ModelState)); } if (await service.AddConsultant(model)) { logger.LogInformation("Result is Ok(200). Added consultant with" + " name: {0}, surname: {1}", model.Name, model.Surname); return(Ok()); } logger.LogInformation("Result is Internal Server Error(500)"); return(new StatusCodeResult(StatusCodes.Status500InternalServerError)); }