DbContextModelLoader<T> class
Represents a IModelLoader implementation which allows to load the model from a DbContext object. Implements the Korzh.EasyQuery.Services.IModelLoader
public class Korzh.EasyQuery.Services.DbContextModelLoader<T> : IModelLoader
Package: Korzh.EasyQuery.EntityFrameworkCore.Relational
(targets: net5.0
, netstandard2.0
, netstandard2.1
)
Assembly: Korzh.EasyQuery.EntityFrameworkCore.Relational.dll
Constructors
Section titled “Constructors”Name | Type | Description |
---|---|---|
DbContextModelLoader(IServiceProvider services) | void | Initializes a new instance of the Korzh.EasyQuery.Services.DbContextModelLoader`1 class. |
DbContextModelLoader(IServiceProvider services, DbContextModelExtractorOptions options) | void | Initializes a new instance of the Korzh.EasyQuery.Services.DbContextModelLoader`1 class. |
Methods
Section titled “Methods”Name | Type | Description |
---|---|---|
AdjustExtractorOptions(string modelId, DbContextModelExtractorOptions options) | void | Allows to adjust the loader options in descendant classes |
LoadModelAsync(DataModel model, string modelId) | Task <bool > | Loads the model from the DbContext object that we get from the DI container. NB: The model ID is not actually taking into account since the model is defined by a concrete DbContext type. |