Beispiel #1
0
 public virtual void DoEdit()
 {
     if (typeof(TModel).GetInterface("IMLData") != null)
     {
         if ((Entity as dynamic).MLContents != null)
         {
             foreach (var item in (Entity as dynamic).MLContents)
             {
                 DC.SetStatus(item, System.Data.Entity.EntityState.Modified);
             }
         }
     }
     DC.SetStatus(Entity, System.Data.Entity.EntityState.Modified);
     DC.Commit();
 }
Beispiel #2
0
 public virtual void DoAdd()
 {
     DC.GetSet <TModel>().Add(Entity);
     DC.Commit();
 }
Beispiel #3
0
 public virtual void DoDelete()
 {
     DC.DeleteEntity(DC.GetSet <TModel>(), Entity);
     DC.Commit();
 }