Skip to main content

dbcontextmodelextractoroptions-class

Contains different options for Korzh.EasyQuery.EntityFrameworkCore.DbContextModelExtractor

public class Korzh.EasyQuery.EntityFrameworkCore.DbContextModelExtractorOptions

Assembly: Korzh.EasyQuery.EntityFrameworkCore.Relational.dll

Constructors

NameTypeDescription
DbContextModelExtractorOptions()void

Properties

NameTypeDescription
FiltersIReadOnlyList<Func<IEntityType, bool>>The Filtes
HidePrimaryKeysboolGets or sets a value indicating whether we need to hide primary key fields in the data model.
SkipForeignKeysboolGets or sets a value indicating whether we need to skip foreign key fields and don't include them into the data model.
SortAlphabeticallyboolIf true, sorts all entities and their attributes in alphabet order
SplitTablesOnMultiReferenceboolSplit one table on two (or more) if there are multi-references between two tables
SqlFormatsSqlFormatsGets or sets the SQL formats used during the model extraction
TablePerHierarchyboolIf true, add one table for each entity derived from one abstract type
UseOuterJoinsboolIf true (default value) the model extractor will automatically create LEFT OUTER joins if the FK in the second table is nullable

Methods

NameTypeDescription
AddFilter(Func<IEntityType, bool> filter)voidAdds a filter, which will be used during model loading from Microsoft.EntityFrameworkCore.DbContext