Class SchemaOptions
public sealed class SchemaOptions
- Inheritance
-
SchemaOptions
- Extension Methods
Properties
Catalogs
List of catalogs(databases) to include or exclude (see IncludeCatalogs) from schema load.
- Default: empty
- In T4 compability mode: empty
public ISet<string> Catalogs { get; }
Property Value
DefaultSchemas
List of default schemas. When null
, use default schema information from database schema provider.
- Default:
null
- In T4 compability mode:
null
public ISet<string>? DefaultSchemas { get; set; }
Property Value
EnableSqlServerReturnValue
Generate RETURN_VALUE stored procedure parameter for SQL Server.
- Default:
false
- In T4 compability mode:
false
public bool EnableSqlServerReturnValue { get; set; }
Property Value
IgnoreDuplicateForeignKeys
Specify that schema load procedure should ignore duplicate foreign keys (keys with different names but same set of columns). If ignore mode enabled, only one instance of foreign key will be loaded (in order, returned from database).
- Default:
true
- In T4 compability mode:
false
public bool IgnoreDuplicateForeignKeys { get; set; }
Property Value
IgnoreSystemHistoryTables
This option applied only to SQL Server 2016+ and, when enabled, removes history tables information for temporal tables from schema load results.
- Default:
false
- In T4 compability mode:
false
public bool IgnoreSystemHistoryTables { get; set; }
Property Value
IncludeCatalogs
Specify how to treat Catalogs list, when it is not empty.
When true
, load only specified catalogs, otherwise all load catalogs except specififed in Catalogs.
- Default:
true
- In T4 compability mode:
true
public bool IncludeCatalogs { get; set; }
Property Value
IncludeSchemas
Specify how to treat Schemas list, when it is not empty.
When true
, load only specified schemas, otherwise load all schemas except specififed in Schemas.
- Default:
true
- In T4 compability mode:
true
public bool IncludeSchemas { get; set; }
Property Value
LoadAggregateFunction
Delegate to filter loaded aggregate functions by database name (only name and schema provided). Returns true
, if aggregate function should be loaded.
- Default: all aggregate functions allowed.
- In T4 compability mode: all aggregate functions allowed
public Func<SqlObjectName, bool> LoadAggregateFunction { get; set; }
Property Value
LoadDatabaseName
Include database name component into db object name in schema.
- Default:
false
- In T4 compability mode:
false
public bool LoadDatabaseName { get; set; }
Property Value
LoadProcedureSchema
Delegate to specify if schema should be loaded for procedure by procedure's database name (only name and schema provided). Returns true
, if procedure schema should be loaded.
- Default: all procedures allowed.
- In T4 compability mode: all procedures allowed
public Func<SqlObjectName, bool> LoadProcedureSchema { get; set; }
Property Value
LoadProceduresSchema
Specify stored procedures schema load mode: with result schema or without.
- Default:
false
- In T4 compability mode:
true
public bool LoadProceduresSchema { get; set; }
Property Value
LoadScalarFunction
Delegate to filter loaded scalar functions by database name (only name and schema provided). Returns true
, if scalar function should be loaded.
- Default: all scalar functions allowed.
- In T4 compability mode: all scalar functions allowed
public Func<SqlObjectName, bool> LoadScalarFunction { get; set; }
Property Value
LoadStoredProcedure
Delegate to filter loaded stored procedured by database name (only name and schema provided). Returns true
, if stored procedure should be loaded.
- Default: all stored procedures allowed.
- In T4 compability mode: all stored procedures allowed
public Func<SqlObjectName, bool> LoadStoredProcedure { get; set; }
Property Value
LoadTableFunction
Delegate to filter loaded table functions by database name (only name and schema provided). Returns true
, if table function should be loaded.
- Default: all table functions allowed.
- In T4 compability mode: all table functions allowed
public Func<SqlObjectName, bool> LoadTableFunction { get; set; }
Property Value
LoadTableOrView
Delegate to filter loaded tables and views by database name (only name and schema provided). Returns true
, if table/view should be loaded.
Second parameter (isView) in delegate provides true
for view and false
for table.
- Default: all tables and views allowed.
- In T4 compability mode: all tables and views allowed.
public Func<SqlObjectName, bool, bool> LoadTableOrView { get; set; }
Property Value
LoadedObjects
Gets or sets flags, that specify which database objects to load from database schema.
- Default: Table | View | ForeignKey
- In T4 compability mode: Table | View | ForeignKey | StoredProcedure | ScalarFunction | TableFunction | AggregateFunction
public SchemaObjects LoadedObjects { get; set; }
Property Value
PreferProviderSpecificTypes
When set to true
, will prefer generation of provider-specific types instead of general types in mappings (for columns and procedure/function parameters).
- Default:
false
- In T4 compability mode:
false
public bool PreferProviderSpecificTypes { get; set; }
Property Value
Schemas
List of schemas(owners) to include or exclude (see IncludeSchemas) from schema load.
- Default: empty
- In T4 compability mode: empty
public ISet<string> Schemas { get; }
Property Value
UseSafeSchemaLoad
Specify stored procedure or table function schema load mode.
When false
, procedure or function will be executed with SchemaOnly option.
Otherwise more safe approach will be used (currently supported only by SQL Server and uses sp_describe_first_result_set stored procedure).
If safe-load mode not supported by database, schema load will be disabled.
While SchemaOnly is safe in most of cases, it could create issues, when executed procedure contains
non-transactional logic.
- Default:
true
- In T4 compability mode:
false
public bool UseSafeSchemaLoad { get; set; }