public PhotographerModel(PhotoGalleryBE pgBE) { Company = pgBE.PhotographerCompany; Name = pgBE.PhotographerName; URL = pgBE.PhotographerURL; PhotoGalleries = new List <PhotoGalleryModel>(); PhotoGalleries.Add(new PhotoGalleryModel(pgBE)); }
/// <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); }
public PhotoGalleryModel(PhotoGalleryBE pgBE) { GameID = pgBE.GameID; GalleryURL = pgBE.GalleryURL; GalleryName = pgBE.GalleryName; }