Пример #1
0
        public void AddLandingPage(LandingPageDetailDTO item)
        {
            p1p.Data.LandingPage newLandingPage;
            p1p.Data.LandingPage mdlLandingPage = (p1p.Data.LandingPage)P1PObjectMapper.Convert(item, typeof(p1p.Data.LandingPage));
            mdlLandingPage.InsertDate = DateTime.Now;
            using (P1PContext ctx = new P1PContext())
            {
                newLandingPage = ctx.LandingPages.Add(mdlLandingPage);
                ctx.ProjectLandingPageXREFs.Add(new ProjectLandingPageXREF()
                {
                    ProjectId           = item.ProjectId,
                    LandingPageId       = newLandingPage.Id,
                    LandingPagePriority = item.Priority,
                    InsertDate          = DateTime.Now
                });

                ctx.SaveChanges();
            }
        }
Пример #2
0
 public void AddLandingPage(LandingPageDetailDTO item)
 {
     repo.AddLandingPage(item);
 }