Пример #1
0
        public ActionResult PostApplicant(ApplicantViewModel model)
        {
            _logger.LogInformation("Accespt request to save applicant info");
            var result = _manager.HandleErrors(model);

            if (result.Count > 0)
            {
                return(BadRequest(result));
            }
            else
            {
                var response = _manager.SaveApplicant(model);
                if (response == null)
                {
                    return(StatusCode(500));
                }
                return(StatusCode(201, response));
            }
        }