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(); } }
public void AddLandingPage(LandingPageDetailDTO item) { repo.AddLandingPage(item); }