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));
        }