Exemplo n.º 1
0
        public static HomePagePhotoVersions MapToPhotoVersionModel(this HP_PhotoViewModel pgMinisty)
        {
            HomePagePhotoVersions viewModel = new HomePagePhotoVersions()
            {
                Id = pgMinisty.PhotoId ?? pgMinisty.Id,
                IsActive = pgMinisty.IsActive,
                IsDeleted = pgMinisty.IsDeleted,
                VersionStatusEnum = pgMinisty.VersionStatusEnum,
                ChangeActionEnum = pgMinisty.ChangeActionEnum,
                CreationDate = pgMinisty.CreationDate,
                ModificationDate = pgMinisty.ModificationDate,
                ModifiedById = pgMinisty.ModifiedById,
                ApprovalDate = pgMinisty.ApprovalDate,
                ApprovedById = pgMinisty.ApprovedById,
                CreatedById = pgMinisty.CreatedById,
                ArDescription = pgMinisty.ArDescription,
                ArTitle = pgMinisty.ArTitle,
                EnDescription = pgMinisty.EnDescription,
                EnTitle = pgMinisty.EnTitle,
                ImageUrl = pgMinisty.ImageUrl,
                HomePagePhotoId = pgMinisty.PhotoId,
                Url = pgMinisty.Url
            };

            return viewModel;
        }
Exemplo n.º 2
0
 public bool Update(HomePagePhotoVersions model)
 {
     try
     {
         _db.HomePagePhotoVersions.Update(model);
         _db.SaveChanges();
         return(true);
     }
     catch (Exception ex)
     {
         return(false);
     }
 }
Exemplo n.º 3
0
 public void Add(HomePagePhotoVersions model)
 {
     _db.HomePagePhotoVersions.Add(model);
     _db.SaveChanges();
 }