Exemple #1
0
        public async Task Handle(UserLoggedInEvent notification, CancellationToken cancellationToken)
        {
            var log = _mapper.Map <UserLoginLog>(notification);
            await _loginLogRepository.AddAsync(log);

            await _loginLogRepository.SaveChangesAsync();
        }
Exemple #2
0
        public Task Handle(LoginResultModel model)
        {
            var entity = new LoginLogEntity
            {
                AccountId = model.AccountId,
                UserName  = model.UserName,
                Email     = model.Email,
                Error     = model.Error,
                LoginMode = model.LoginMode,
                LoginTime = model.LoginTime,
                Phone     = model.Phone,
                Platform  = model.Platform,
                Success   = model.Success,
                IP        = _loginInfo.IP,
                UserAgent = _loginInfo.UserAgent
            };

            return(_repository.AddAsync(entity));
        }
Exemple #3
0
 public Task Handle(LoginLogEntity entity)
 {
     return(_repository.AddAsync(entity));
 }