예제 #1
0
        public void DeleteFrePasser(int id)
        {
            var passer = this._frePasserRepository.FindAll(p => p.Id == id).FirstOrDefault();

            unitOfWorkRepository.PersistDeletionOf(passer);
            unitOfWork.Commit();
        }
예제 #2
0
        public void BatchDelete(Guid[] ids)
        {
            var code = AuthManager.GetCurrentUser().Code;

            this.localPolicyRepository.FindAll(p => p.Code == code && ids.Contains(p.ID)).ToList().ForEach(p =>
            {
                unitOfWorkRepository.PersistDeletionOf(p);
            });
            unitOfWork.Commit();
        }
        public void DeleteDeduction(int id)
        {
            var model = this.deductionRepository.FindAll(p => p.ID == id).FirstOrDefault();

            if (model == null)
            {
                throw new CustomException(400, "不存在或已被删除");
            }
            model.DeductionRules.Clear();
            unitOfWorkRepository.PersistDeletionOf(model);
            unitOfWork.Commit();
        }
예제 #4
0
 public void RegisterRemoved(IAggregateRoot entity, IUnitOfWorkRepository unitofWorkRepository)
 {
     unitofWorkRepository.PersistDeletionOf(entity);
 }
예제 #5
0
 public void RegisterRemoved(Infrastructure.IAggregateRoot entity, IUnitOfWorkRepository unitOfWorkRepository)
 {
     unitOfWorkRepository.PersistDeletionOf(entity);
 }
예제 #6
0
 public void RegisterRemoved(IAggregateRoot entity, IUnitOfWorkRepository repository)
 {
     repository.PersistDeletionOf(entity);
 }