示例#1
0
 public void RegisterAdd(IAggregateRoot entity, IUnitOfWorkRepository unitOfWorkRepository)
 {
     if (_ItemQueue == null)
         _ItemQueue = new Queue<UnitItem>();
     UnitItem unitItem=new UnitItem()
     { Entity = entity, UnitOfWorkRepository = unitOfWorkRepository, Operator = UnitOperator.Add };
     if (_ItemQueue.Contains(unitItem))
     {
         throw new Exception("exist Entity in RegistorAdd!");
     }
     else
     {
         _ItemQueue.Enqueue(unitItem);
     }
 }