コード例 #1
0
 public static FriendshipApiModel From(Friendship friendship)
 {
     return(new FriendshipApiModel
     {
         FromId = friendship.FromId,
         ToId = friendship.ToId,
         To = UserProfileApiModel.From(friendship.To),
     });
 }
コード例 #2
0
 public static UserProfile To(this UserProfileApiModel model)
 {
     return(new UserProfile
     {
         Id = model.Id,
         BirthDate = model.BirthDate,
         FirstName = model.FirstName,
         LastName = model.LastName,
         Sex = model.Sex
     });
 }