Exemplo n.º 1
0
        public async Task <IActionResult> GetCodeIdDefault(int id)
        {
            var Response = new SingleResponse <Code>();

            try
            {
                Response.Model = await _ICodeRepository.GetCodeByIdDefaultAsync(id);

                Response.Message = $"Querying Code with the id: {id} with default information.";
                _Logger.LogInfo(ControllerContext, Response.Message);
            }
            catch (Exception ex)
            {
                Response.DidError = true;
                Response.Message  = "Internal Server Error.";
                _Logger.LogError(ControllerContext, $"Error Message: {ex.Message}");
            }
            return(Response.ToHttpResponse());
        }