예제 #1
0
 /// <summary>
 /// 添加一个聚合根实体对象到仓储。
 /// </summary>
 /// <param name="aggregateRoot">被添加到聚合根实体仓储的聚合根实体对象。</param>
 protected override void DoAdd(TAggregateRoot aggregateRoot)
 {
     EfContext.RegisterNew(aggregateRoot);
 }
예제 #2
0
 /// <summary>
 /// 更新当前聚合根实体仓储中的给定的聚合根对象。
 /// </summary>
 /// <param name="aggregateRoot">将被更新的聚合根实体对象。</param>
 protected override void DoUpdate(TAggregateRoot aggregateRoot)
 {
     EfContext.RegisterModified(aggregateRoot);
 }
예제 #3
0
 /// <summary>
 /// 从仓储中移除给定的聚合根实体。
 /// </summary>
 /// <param name="aggregateRoot">将被移除的聚合根实体。</param>
 protected override void DoRemove(TAggregateRoot aggregateRoot)
 {
     // TODO:区分标记删除
     EfContext.RegisterDeleted(aggregateRoot);
 }