Exemplo n.º 1
0
 public void SaveSiteAD(SiteADEntity param)
 {
     using (var context = base.CreateContext())
     {
         SiteAD pObj;
         if (param.RowID == Guid.Empty)
         {
             context.SiteADs.Add(pObj = new SiteAD());
             EntityMapper.Map <SiteADEntity, SiteAD>(param, pObj);
             pObj.RowID = Guid.NewGuid();
         }
         else
         {
             pObj = context.SiteADs.Single(t => t.RowID == param.RowID);
             EntityMapper.Map <SiteADEntity, SiteAD>(param, pObj);
         }
         context.SaveChanges();
     }
 }
Exemplo n.º 2
0
        public void SaveSiteAD(SiteADEntity param)
        {
            var repository = new SiteRepository();

            repository.SaveSiteAD(param);
        }