public DeleteModificationStoredProcedureConfiguration <TEntityType> Navigation <TPrincipalEntityType>(
            Expression <Func <TPrincipalEntityType, ICollection <TEntityType> > > navigationPropertyExpression,
            Action <AssociationModificationStoredProcedureConfiguration <TPrincipalEntityType> > associationModificationStoredProcedureConfigurationAction)
            where TPrincipalEntityType : class
        {
            Check.NotNull(navigationPropertyExpression, "navigationPropertyExpression");
            Check.NotNull(associationModificationStoredProcedureConfigurationAction, "associationModificationStoredProcedureConfigurationAction");

            var associationModificationStoredProcedureConfiguration
                = new AssociationModificationStoredProcedureConfiguration <TPrincipalEntityType>(
                      navigationPropertyExpression.GetSimplePropertyAccess().Single(),
                      Configuration);

            associationModificationStoredProcedureConfigurationAction(associationModificationStoredProcedureConfiguration);

            return(this);
        }
Пример #2
0
        public InsertModificationStoredProcedureConfiguration <TEntityType> Navigation <TPrincipalEntityType>(
            Expression <Func <TPrincipalEntityType, ICollection <TEntityType> > > navigationPropertyExpression,
            Action <AssociationModificationStoredProcedureConfiguration <TPrincipalEntityType> > associationModificationStoredProcedureConfigurationAction)
            where TPrincipalEntityType : class
        {
            Check.NotNull <Expression <Func <TPrincipalEntityType, ICollection <TEntityType> > > >(navigationPropertyExpression, nameof(navigationPropertyExpression));
            Check.NotNull <Action <AssociationModificationStoredProcedureConfiguration <TPrincipalEntityType> > >(associationModificationStoredProcedureConfigurationAction, nameof(associationModificationStoredProcedureConfigurationAction));
            AssociationModificationStoredProcedureConfiguration <TPrincipalEntityType> procedureConfiguration = new AssociationModificationStoredProcedureConfiguration <TPrincipalEntityType>(navigationPropertyExpression.GetSimplePropertyAccess().Single <PropertyInfo>(), this.Configuration);

            associationModificationStoredProcedureConfigurationAction(procedureConfiguration);
            return(this);
        }