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; }
protected AssociationClassCrudServiceBase(IProvideAssociationClassItemByIds <TEntity, FirstId, SecondId> entityProvider, ICreateEntityWithValidation <TEntity> entityCreator, IUpdateEntityWithValidation <TEntity> entityUpdater, IDeleteAssociationClassEntityWithValidation <TEntity, FirstId, SecondId> entityDestroyer) { if (entityProvider == null || entityCreator == null || entityUpdater == null || entityDestroyer == null) { throw new ArgumentNullException(); } Contract.EndContractBlock(); _validationErrors = new Dictionary <string, string>(); _entityProvider = entityProvider; _entityCreator = entityCreator; _entityUpdater = entityUpdater; _entityDestroyer = entityDestroyer; }