コード例 #1
0
        public IActionResult GetRoleByID(int roleID)
        {
            try
            {
                //_logger.LogInfo("Fetching all the roles from the storage");
                RoleMaster role = _roleService.GetRolebyId(roleID);

                RoleViewModel roleVM = Mapper.Map <RoleViewModel>(role);

                // _logger.LogInfo($"Returning {role} roles.");

                return(Ok(role));
            }
            catch (Exception ex)
            {
                throw ex;
                //_logger.LogError($"Something went wrong: {ex}");
                //return StatusCode(500, "Internal server error");
            }
        }