public IActionResult Index() { var lastEvents = _authenticationService.GetLastEvents(20).ToList(); var lastUsers = _authenticationService.GetLastUpdatedUsers(10); var viewModel = _usersViewModelMapper.Map(lastEvents, lastUsers); return(View(viewModel)); }
public IActionResult Index(string userId) { Guid userGuid; Guid.TryParse(userId, out userGuid); var viewModel = new UserViewModel(); if (userGuid != Guid.Empty) { var events = _authenticationService.GetHistoryForUserId(userGuid); var storedUser = _authenticationService.GetStoredUser(userGuid); viewModel.History = events.Select(_usersViewModelMapper.Map).ToList(); viewModel.StoredUser = _usersViewModelMapper.Map(storedUser); } return(View(viewModel)); }