示例#1
0
 /// <summary>
 /// 删除实体(提交更改后生效)
 /// </summary>
 /// <param name="entity"></param>
 public void DeleteOnSubmit(DirectoryEntity entity)
 {
     if (!_changes.ContainsKey(entity))
     {
         DirectoryChangeInfo info = new DirectoryChangeInfo {
             ChangeType = ChangeType.Delete,
             Entity     = entity
         };
         _changes.Add(entity, info);
     }
 }
示例#2
0
 /// <summary>
 /// 插入实体(提交更改后生效)
 /// </summary>
 /// <param name="parent"></param>
 /// <param name="entity"></param>
 public void InsertOnSubmit(DirectoryEntry parent, DirectoryEntity entity)
 {
     if (!_changes.ContainsKey(entity))
     {
         DirectoryChangeInfo info = new DirectoryChangeInfo {
             ChangeType = ChangeType.Insert,
             Entity     = entity,
             Parent     = parent
         };
         _changes.Add(entity, info);
     }
 }