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(); }
public virtual void DoAdd() { DC.GetSet <TModel>().Add(Entity); DC.Commit(); }
public virtual void DoDelete() { DC.DeleteEntity(DC.GetSet <TModel>(), Entity); DC.Commit(); }