Skip to main content

dbconnectionmodelloader-class

Represents a IModelLoader implementation which allows to load the model directly from a connection (using DB meta data)

public class Korzh.EasyQuery.Services.DbConnectionModelLoader
: IModelLoader

Assembly: Korzh.EasyQuery.Db.dll

Constructors

NameTypeDescription
DbConnectionModelLoader(DbConnection connection, DbConnectionModelLoaderOptions options)voidInitializes a new instance of the Korzh.EasyQuery.Services.DbConnectionModelLoader class.
DbConnectionModelLoader(Func<DbConnection> connectionResolver, DbConnectionModelLoaderOptions options)voidInitializes a new instance of the Korzh.EasyQuery.Services.DbConnectionModelLoader class.

Methods

NameTypeDescription
LoadModelAsync(DataModel model, string modelId, CancellationToken ct = null)Task<bool>Loads the model from the connection passed in the loader's constructor. NB: The model ID is not actually taking into account.