public Dictionary <string, UserInfoDTO> GetAllEmployeesGroupedById() { return(_context.Users.Select(x => DtoMapper.MapEmployeeToDTO(x)).ToDictionary(x => x.Id, x => x)); }
public async Task <UserInfoDTO> AddUpdateUserInfo(string loggedUserId, EmployeeTypeEnum loggedUserType, NewUserInfoDTO newUserInfoDTO) { Employee employee = newUserInfoDTO.IsNewUser ? await addNewUserInfo(loggedUserType, newUserInfoDTO) : await updateUserInfo(loggedUserId, loggedUserType, newUserInfoDTO); return(DtoMapper.MapEmployeeToDTO(employee)); }
public async Task <IActionResult> GetLoggedEmployeeInfo() { var user = await _userManager.GetUserAsync(User); return(Ok(DtoMapper.MapEmployeeToDTO(user))); }