DocSas/PropertyService.Domain/ModelView/Users/UserProvider.cs
/// <summary>
/// verify user session as an asynchronous operation.
/// </summary>
/// <param name="userVM">The user vm.</param>
/// <returns>Task&lt;DSCResponse&gt;.</returns>
verify user session as an asynchronous operation.
verify user session as an asynchronous operation .
public async Task<DSCResponse> VerifyUserSessionAsync(UserVM userVM)
        {
            var response = new DSCResponse();
            var isSuccess = false;
            var user = await _appCommon.GetUserAsync(userVM.Id);
            if (user != null && userVM.LoginSessionId.HasValue && userVM.LoginSessionId == userVM.LoginSessionId)
            {
                var verifyUser = _appCommon.IsUserAccountValid(user);
                if (verifyUser.IsSuccess)
                {
                    var data = verifyUser.ResponseData as bool?;
                    if (data.HasValue)
                    {
                        isSuccess = data.Value;
                    }
                }
            }
            response.ResponseData = isSuccess;
            return response;
        }
public async Task < DSCResponse > VerifyUserSessionAsync ( UserVM userVM ) { var response = new DSCResponse ( ) ; var isSuccess = false ; var user = await _appCommon . GetUserAsync ( userVM . Id ) ; if ( user != null && userVM . LoginSessionId . HasValue && userVM . LoginSessionId == userVM . LoginSessionId ) { var verifyUser = _appCommon . IsUserAccountValid ( user ) ; if ( verifyUser . IsSuccess ) { var data = verifyUser . ResponseData as bool ? ; if ( data . HasValue ) { isSuccess = data . Value ; } } } response . ResponseData = isSuccess ; return response ; }
verify user session as an asynchronous operation.
verify user session as an asynchronous operation .
None
userVM
UserVM
The user vm.
The user vm .