コード例 #1
0
 public PhotographerModel(PhotoGalleryBE pgBE)
 {
     Company        = pgBE.PhotographerCompany;
     Name           = pgBE.PhotographerName;
     URL            = pgBE.PhotographerURL;
     PhotoGalleries = new List <PhotoGalleryModel>();
     PhotoGalleries.Add(new PhotoGalleryModel(pgBE));
 }
コード例 #2
0
        /// <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);
        }
コード例 #3
0
        /// <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);
        }
コード例 #4
0
 public PhotoGalleryModel(PhotoGalleryBE pgBE)
 {
     GameID      = pgBE.GameID;
     GalleryURL  = pgBE.GalleryURL;
     GalleryName = pgBE.GalleryName;
 }