public DetailsModel Login([FromBody] LoginClient loginClient) { try { if (_loginService.Login(loginClient.Name, loginClient.PhoneNumber) != null) { Client client = _loginService.Login(loginClient.Name, loginClient.PhoneNumber); DetailsModel detailsModel = new DetailsModel() { CurrentClient = client, ClientLines = _detailService.GetClientLines(client.Id) }; detailsModel.LineList(detailsModel.ClientLines); return(detailsModel); } else { return(null); } } catch (Exception ex) { Common.EnvironmentService.Services.WriteExceptionsToLogger(ex); throw new HttpResponseException(HttpStatusCode.BadRequest); } }