コード例 #1
0
 public static model::Comment Map(data::Comment comment)
 {
     return new model.Comment
     {
         Text = comment.Text,
         CreatedOn = comment.CreatedOn,
         Author = UserMapper.Map(comment.User)
     };
 }
コード例 #2
0
 public static model::User Map(data::User user)
 {
     return new model.User
     {
         Id = user.Id,
         CreatedOn = user.CreatedOn,
         FullName = user.FullName,
         IsPremiumUser = user.IsPremiumUser
     };
 }
コード例 #3
0
 public static model::Note Map(data::Note note)
 {
     return new model.Note
     {
         Id = note.Id,
         CreatedOn = note.CreatedOn,
         Text = note.Text,
         Title = note.Title,
         Author = UserMapper.Map(note.User),
         Comments = note.Comments.Select(CommentMapper.Map).ToList()
     };
 }