public void DeleteFrePasser(int id) { var passer = this._frePasserRepository.FindAll(p => p.Id == id).FirstOrDefault(); unitOfWorkRepository.PersistDeletionOf(passer); unitOfWork.Commit(); }
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(); }
public void RegisterRemoved(IAggregateRoot entity, IUnitOfWorkRepository unitofWorkRepository) { unitofWorkRepository.PersistDeletionOf(entity); }
public void RegisterRemoved(Infrastructure.IAggregateRoot entity, IUnitOfWorkRepository unitOfWorkRepository) { unitOfWorkRepository.PersistDeletionOf(entity); }
public void RegisterRemoved(IAggregateRoot entity, IUnitOfWorkRepository repository) { repository.PersistDeletionOf(entity); }