public List <UserDTO> GetUsers() { List <UserDTO> oUserDTOs = new List <UserDTO>(); List <User> oUsers = oUsersRepo.GetUsers().ToList(); if (oUsers != null && oUsers.Count > 0) { oUserDTOs = UserAssembler.ToDTOs(oUsers); /* * if (oUser.UserAddresses != null && oUser.UserAddresses.Count > 0) * { * oUserDTO.UserAddresses = UserAddressAssembler.ToDTOs(oUser.UserAddresses); * } * * if (oUser.UserEmails != null && oUser.UserEmails.Count > 0) * { * oUserDTO.UserEmails = UserEmailAssembler.ToDTOs(oUser.UserEmails); * } * * if (oUser.UserPhones != null && oUser.UserPhones.Count > 0) * { * oUserDTO.UserPhones = UserPhoneAssembler.ToDTOs(oUser.UserPhones); * } */ } return(oUserDTOs); }
public List <UserDTO> Get() { List <UserDTO> userDTO = new List <UserDTO>(); List <User> oUsers = usersRepo.GetUsers().ToList(); if (oUsers != null && oUsers.Count > 0) { userDTO = UserAssembler.ToDTOs(oUsers); } return(userDTO); }
public List <UserDTO> GetUsersBySearch(string searchText, int from, int to) { return(UserAssembler.ToDTOs(usersRepo.GetUsersBySearch(searchText, from, to))); }