コード例 #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));
        }
コード例 #2
0
 internal PropertyConfigurationQueryOptions(DbSetConfigurationQueryOptions <TContext, TEntity> options, DbSetConfiguration dbSetConfiguration, PropertyConfiguration propertyConfiguration)
 {
     _options               = options;
     _dbSetConfiguration    = dbSetConfiguration;
     _propertyConfiguration = propertyConfiguration;
 }
コード例 #3
0
 internal DbSetConfigurationQueryOptions(QueryOptions <TContext> options, DbSetConfiguration dbSetConfiguration)
 {
     _options            = options;
     _dbSetConfiguration = dbSetConfiguration;
 }