public IActionResult EmployeeDetail(string id) { var employee = UsersDataService.GetById(id); if (employee == null) { return(NotFound()); } return(View(new UsersViewModel { Id = employee.Id, FirstName = employee.FirstName, LastName = employee.LastName, Email = employee.Email, Age = employee.Age, })); }
public IActionResult Index() { var user = userDataService.GetById(User.FindFirstValue(ClaimTypes.NameIdentifier)); return(View(new UsersViewModel { FirstName = user.FirstName, LastName = user.LastName, Email = user.Email, Age = user.Age, Id = user.Id, })); }
public async Task <Users> GetByIdAsync(int userId) { return(await _usersDataService.GetById(userId)); }
public async Task <UserDto> GetByIdAsync(int userId) { var entity = await _userService.GetById(userId); return(FactoryMapper.MapToDtoWithPassword(entity)); }