protected CrudWithValidationServiceBase(IProvideItemById <TEntity, TId> entityProvider = null, IProvideItemByIdWithIncludes <TEntity, TId> entityWithIncludesProvider = null, ICreateEntityWithValidation <TEntity> entityCreator = null, IUpdateEntityWithValidation <TEntity> entityUpdater = null, IDeleteEntityWithValidation <TEntity, TId> entityDestroyer = null) { _validationErrors = new Dictionary <string, string>(); _entityProvider = entityProvider; _entityWithIncludesProvider = entityWithIncludesProvider; _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; }