public async Task <IActionResult> GetUserRoles()
 {
     try
     {
         var roles = _roleService.All();
         return(Ok(roles));
     }
     catch (Exception x)
     {
         Log.Error($"ERROR Roles/GetUserRoles");
         return(StatusCode(500, x.Message));
     }
 }
示例#2
0
        public IActionResult All()
        {
            var res = _mapper.Map <IEnumerable <RoleDto> >(_roleService.All());

            return(Ok(res));
        }
示例#3
0
        public IEnumerable <RoleDto> GetRoles()
        {
            var result = roleService.All();

            return(result);
        }
示例#4
0
        public ActionResult Index()
        {
            var rol = rolservice.All();

            return(View(rol));
        }