Exemplo n.º 1
0
 public ResponseMessageData <UserAccessData> AuthenticateUser(UserAccessData loginInfo)
 {
     if (loginInfo != null)
     {
         UserAccessData result = userRepo.UserLogin(loginInfo);
         if (result.UserName != null)
         {
             response = new ResponseMessageData <UserAccessData>()
             {
                 Data    = result,
                 Message = "Success"
             };
         }
         else
         {
             response = new ResponseMessageData <UserAccessData>()
             {
                 Data    = null,
                 Message = "NoUserFound"
             };
         }
         return(response);
     }
     else
     {
         response = new ResponseMessageData <UserAccessData>()
         {
             Data    = null,
             Message = "NoData"
         };
         return(response);
     }
 }