예제 #1
0
 public Response <List <UserGroupViewModel> > GetAllUserGroups()
 {
     try
     {
         var data = _userGroupRepository.GetAllUserGroups();
         if (data != null && data.Any())
         {
             return(new Response <List <UserGroupViewModel> >(true, "Success", data));
         }
         return(new Response <List <UserGroupViewModel> >(false, "Fail", null));
     }
     catch (Exception e)
     {
         _logger.Error($"GetAllUserGroups Failed: {e.Message}\n {e.StackTrace}");
         return(new Response <List <UserGroupViewModel> >(false, e.Message, null));
     }
 }
예제 #2
0
 public List <UserGroup> GetAllUserGroups()
 {
     return(ugRepo.GetAllUserGroups());
 }