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); }