Exemple #1
0
        public IDbSetConfigurationQueryOptions <TContext, TProperty> ConfigureSet <TProperty>(
            Expression <Func <TContext, DbSet <TProperty> > > dbSetExpression,
            string fieldName    = null,
            SetOption setOption = SetOption.IncludeAsFieldAndChild,
            Expression <Func <TProperty, bool> > defaultFilter = null)
            where TProperty : class
        {
            var dbSetConfiguration = new DbSetConfiguration
            {
                Type             = typeof(TProperty),
                SetOption        = setOption,
                FieldName        = fieldName,
                FilterExpression = defaultFilter
            };

            ((List <IDbSetConfiguration>)DbSetConfigurations).Add(dbSetConfiguration);

            return(new DbSetConfigurationQueryOptions <TContext, TProperty>(this, dbSetConfiguration));
        }
 internal PropertyConfigurationQueryOptions(DbSetConfigurationQueryOptions <TContext, TEntity> options, DbSetConfiguration dbSetConfiguration, PropertyConfiguration propertyConfiguration)
 {
     _options               = options;
     _dbSetConfiguration    = dbSetConfiguration;
     _propertyConfiguration = propertyConfiguration;
 }
 internal DbSetConfigurationQueryOptions(QueryOptions <TContext> options, DbSetConfiguration dbSetConfiguration)
 {
     _options            = options;
     _dbSetConfiguration = dbSetConfiguration;
 }