コード例 #1
0
        public async Task <IActionResult> Login(LoginRequest request)
        {
            LoginResponse response;

            try
            {
                response = await _businessLogic.CheckCredentialsAsync(request);

                response.ActionResponse = new ActionResponse(StatusCodes.Status200OK);
            }
            catch (Exception ex)
            {
                response = new LoginResponse
                {
                    ActionResponse = new ActionResponse(StatusCodes.Status500InternalServerError)
                };

                response.ActionResponse.StatusDescription += ex.Message.ToString();
            }

            return(StatusCode(response.ActionResponse.StatusCode, response));
        }