示例#1
0
        public static GCR.Core.Entities.HomePagePhoto ToModel(HomePagePhotoViewModel model, GCR.Core.Entities.HomePagePhoto photo = null)
        {
            if (photo == null)
            {
                photo = new GCR.Core.Entities.HomePagePhoto();
            }
            photo.DisplayOrder = model.DisplayOrder;
            photo.PhotoPath    = model.PhotoPath;

            return(photo);
        }
示例#2
0
        public static GCR.Core.Entities.HomePagePhoto ToModel(HomePagePhotoViewModel model, GCR.Core.Entities.HomePagePhoto photo = null)
        {
            if (photo == null)
            {
                photo = new GCR.Core.Entities.HomePagePhoto();
            }
            photo.DisplayOrder = model.DisplayOrder;
            photo.PhotoPath = model.PhotoPath;

            return photo;
        }
示例#3
0
        public static HomePagePhotoViewModel ToViewModel(GCR.Core.Entities.HomePagePhoto photo, HomePagePhotoViewModel model = null)
        {
            if (model == null)
            {
                model = new HomePagePhotoViewModel();
            }
            model.HomePagePhotoId = photo.HomePagePhotoId;
            model.DisplayOrder    = photo.DisplayOrder;
            model.PhotoPath       = photo.PhotoPath;

            return(model);
        }