コード例 #1
0
        public DeleteAssociationClassEntityWithValidationService(
            IDeleteAssociationClassEntity<TEntity, FirstId, SecondId> repository, IUnitOfWork unitOfWork, 
            ILogger<DeleteAssociationClassEntityWithValidationService<TEntity, FirstId, SecondId>> logger = null)
        {
            if (repository == null || unitOfWork == null) throw new ArgumentNullException();
            Contract.EndContractBlock();

            _repository = repository;
            _unitOfWork = unitOfWork;
            _logger = logger;
        }
コード例 #2
0
        protected AssociationClassRepositoryBase(IProvideAssociationClassItemByIds <TEntity, FirstId, SecondId> entityProvider, ICreateEntity <TEntity> entityCreator,
                                                 IUpdateEntity <TEntity> entityUpdater, IDeleteAssociationClassEntity <TEntity, FirstId, SecondId> entityDestroyer)
        {
            if (entityProvider == null || entityCreator == null || entityUpdater == null || entityDestroyer == null)
            {
                throw new ArgumentNullException();
            }
            Contract.EndContractBlock();

            _entityProvider  = entityProvider;
            _entityCreator   = entityCreator;
            _entityUpdater   = entityUpdater;
            _entityDestroyer = entityDestroyer;
        }