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); }
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; }
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); }