public IEnumerable <UserView> GetUsers() { var users = _repo.FindAll(i => i.Addresses).ToList(); var usersView = from user in users select DomainToViewMaps.UserToView(user); return(usersView); }
public UserView AddUser(UserView user) { User domainUser = DomainToViewMaps.UserViewToDomain(user); domainUser = _repo.Insert(domainUser); user = DomainToViewMaps.UserToView(domainUser); return(user); }
public AddressInfoView AddAddressBook(AddressInfoView address) { AddressInfo domainAddress = DomainToViewMaps.AddressInfoViewToDomain(address); domainAddress = _repo.Insert(domainAddress); address = DomainToViewMaps.AddressToView(domainAddress); return(address); }