public async Task <UserLoginHistory> RecordUserLogin(int userId, TokenType type, string provider, string audience) { var userLoginHistory = new UserLoginHistory { UserId = userId, TokenType = type, Provider = provider, Audience = audience, LoginDate = DateTime.UtcNow }; using (var uow = new UnitOfWork(Context)) { var repo = new UserLoginHistoryRepository(uow); return(await repo.Create(userLoginHistory)); } }
public void UserLoggedIn(UserDataObject user) { var repository = new UserLoginHistoryRepository(); repository.Create(user.ToEntity()); }