/// <summary> /// Converts a PhotoGalleryEntity object to a PhotoGallery object /// </summary> /// <param name="photoE">PhotoGalleryEntity to convert</param> /// <returns></returns> private PhotoGalleryBE GetEntity(PhotoGalleryEntity photoGalleryE) { if (null == photoGalleryE) { return(null); } var result = new PhotoGalleryBE { GameID = photoGalleryE.Game.id, Name = photoGalleryE.text, photographer = GetEntity(photoGalleryE.Photographer), URL = photoGalleryE.url }; return(result); }
/// <summary> /// Converts a PhotoGalleryEntity object to a PhotoGallery object /// </summary> /// <param name="photoE">PhotoGalleryEntity to convert</param> /// <returns></returns> private PhotoGalleryBE GetEntity(PhotoGalleryEntity pge) { if (null == pge) { return(null); } var result = new PhotoGalleryBE { GameID = pge.Game.id, GalleryURL = pge.url, PhotographerCompany = pge.Photographer.company, PhotographerName = pge.Photographer.name, PhotographerURL = pge.Photographer.url, GalleryName = pge.text }; return(result); }