public UserModel GetUser(int userId) { UserModel model = new UserModel(); User user = session.Load<User>(userId); return model.FilledBy(user); }
public IList<UserModel> GetPublishers(int projectId) { IList<UserModel> models = new List<UserModel>(); Project project = session.Load<Project>(projectId); foreach (var publisher in project.Publisher) { UserModel model = new UserModel(); model.FilledBy(publisher); models.Add(model); } return models; }