public async Task Handle(UserLoggedInEvent notification, CancellationToken cancellationToken) { var log = _mapper.Map <UserLoginLog>(notification); await _loginLogRepository.AddAsync(log); await _loginLogRepository.SaveChangesAsync(); }
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)); }
public Task Handle(LoginLogEntity entity) { return(_repository.AddAsync(entity)); }