public static PhotoClass MapPhotoEntityModel(PhotoModel photo) { return(new PhotoClass { PhotoId = photo.PhotoId, PhotoName = photo.PhotoName, PComment = PhotoModelMapping.MapCommentsEntityModel(photo.PComment), }); }
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() }); }
public static PhotoModel MapPhotoModel(PhotoClass photo) { return(new PhotoModel { PhotoId = photo.PhotoId, PhotoName = photo.PhotoName, PComment = PhotoModelMapping.MapCommentsModel(photo.PComment), //AlbumID = photo.AlbumID }); }