public ManyToManyNavigationPropertyConfiguration <TEntityType, TTargetEntityType> MapToStoredProcedures(
            Action <ManyToManyModificationStoredProceduresConfiguration <TEntityType, TTargetEntityType> >
            modificationStoredProcedureMappingConfigurationAction)
        {
            Check.NotNull(modificationStoredProcedureMappingConfigurationAction, "modificationStoredProcedureMappingConfigurationAction");

            var modificationStoredProcedureMappingConfiguration
                = new ManyToManyModificationStoredProceduresConfiguration <TEntityType, TTargetEntityType>();

            modificationStoredProcedureMappingConfigurationAction(modificationStoredProcedureMappingConfiguration);

            if (_navigationPropertyConfiguration.ModificationStoredProceduresConfiguration == null)
            {
                _navigationPropertyConfiguration.ModificationStoredProceduresConfiguration
                    = modificationStoredProcedureMappingConfiguration.Configuration;
            }
            else
            {
                _navigationPropertyConfiguration.ModificationStoredProceduresConfiguration
                .Merge(modificationStoredProcedureMappingConfiguration.Configuration, allowOverride: true);
            }

            return(this);
        }
예제 #2
0
        public ManyToManyNavigationPropertyConfiguration <TEntityType, TTargetEntityType> MapToStoredProcedures(
            Action <ManyToManyModificationStoredProceduresConfiguration <TEntityType, TTargetEntityType> > modificationStoredProcedureMappingConfigurationAction)
        {
            Check.NotNull <Action <ManyToManyModificationStoredProceduresConfiguration <TEntityType, TTargetEntityType> > >(modificationStoredProcedureMappingConfigurationAction, nameof(modificationStoredProcedureMappingConfigurationAction));
            ManyToManyModificationStoredProceduresConfiguration <TEntityType, TTargetEntityType> proceduresConfiguration = new ManyToManyModificationStoredProceduresConfiguration <TEntityType, TTargetEntityType>();

            modificationStoredProcedureMappingConfigurationAction(proceduresConfiguration);
            if (this._navigationPropertyConfiguration.ModificationStoredProceduresConfiguration == null)
            {
                this._navigationPropertyConfiguration.ModificationStoredProceduresConfiguration = proceduresConfiguration.Configuration;
            }
            else
            {
                this._navigationPropertyConfiguration.ModificationStoredProceduresConfiguration.Merge(proceduresConfiguration.Configuration, true);
            }
            return(this);
        }