Exemplo n.º 1
0
 public BusinessObject.UserResponse LoginUser(UserLoginRequest userInfo)
 {
     using (var unitOfWork = this.UserRepository.BeginWork())
     {
         var result = this.UserRepository.LoginUser(userInfo, unitOfWork);
         UserResponse userResponseData = new UserResponse();
         if (result != null)
         {
             userResponseData.Token = EncryptHelper.GenerateToken();
         }
         return userResponseData;
     }
 }
Exemplo n.º 2
0
        public BusinessObject.User LoginUser(UserLoginRequest userInfo, IUnitOfWork unitOfWork)
        {
            ValidateUnitOfWork(unitOfWork);

            string procedureName = "dbo.GetUserLogin";

            var parameters = new
            {
                UserName = userInfo.UserName,
                Password = userInfo.Password
            };

            var result = unitOfWork.Query<BusinessObject.User>(procedureName, parameters, commandType: CommandType.StoredProcedure).SingleOrDefault();

            return result;
        }
Exemplo n.º 3
0
 public UserResponse Login(UserLoginRequest userInfo)
 {
     return this.UserService.LoginUser(userInfo);
 }