示例#1
0
 public static PhotoClass MapPhotoEntityModel(PhotoModel photo)
 {
     return(new PhotoClass
     {
         PhotoId = photo.PhotoId,
         PhotoName = photo.PhotoName,
         PComment = PhotoModelMapping.MapCommentsEntityModel(photo.PComment),
     });
 }
示例#2
0
 public static AlbumClass MapAlbumEntityModel(AlbumModel album)
 {
     return(new AlbumClass
     {
         AlbumId = album.AlbumId,
         AlbumName = album.AlbumName,
         Comment = album.AComment.Select(x => CommentsModelMapping.entitymodel(x)).ToList(),
         Photo = album.Photo.Select(x => PhotoModelMapping.EntityToModel(x)).ToList()
     });
 }
示例#3
0
 public static PhotoModel MapPhotoModel(PhotoClass photo)
 {
     return(new PhotoModel
     {
         PhotoId = photo.PhotoId,
         PhotoName = photo.PhotoName,
         PComment = PhotoModelMapping.MapCommentsModel(photo.PComment),
         //AlbumID = photo.AlbumID
     });
 }