public ResultsVM GetAdminLoginTable(AdminLoginRequestVM loginCredetials)
 {
     try
     {
         return(new ResultsVM(_userService.CheckIfUserIsAdmin(loginCredetials), Resources.Enums.StatusCodes.Success, null));
     }
     catch (Exception)
     {
         throw new Exception("Error");
     }
 }
 public bool CheckIfUserIsAdmin(AdminLoginRequestVM loginCredetials)
 {
     try
     {
         var loginDetails = _loginRepo.GetUserLoginDetails(loginCredetials.UserId).Result;
         return(loginDetails.RoleId == (int)Roles.Admin);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }