示例#1
0
        public UserModel GetUser(int userId)
        {
            UserModel model = new UserModel();

            User user = session.Load<User>(userId);
            return model.FilledBy(user);
        }
示例#2
0
 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;
 }