Class SqlServerProvider
- Namespace
- JJMasterData.Commons.Data.Entity.Providers
- Assembly
- JJMasterData.Commons.dll
public class SqlServerProvider : EntityProviderBase
- Inheritance
-
SqlServerProvider
- Inherited Members
Constructors
SqlServerProvider(SqlServerScripts, IMemoryCache, IOptionsSnapshot<MasterDataCommonsOptions>, ILoggerFactory)
public SqlServerProvider(SqlServerScripts sqlServerScripts, IMemoryCache memoryCache, IOptionsSnapshot<MasterDataCommonsOptions> options, ILoggerFactory loggerFactory)
Parameters
sqlServerScripts
SqlServerScriptsmemoryCache
IMemoryCacheoptions
IOptionsSnapshot<MasterDataCommonsOptions>loggerFactory
ILoggerFactory
Properties
VariablePrefix
public override string VariablePrefix { get; }
Property Value
Methods
ColumnExistsAsync(string, string, Guid?, CancellationToken)
public override Task<bool> ColumnExistsAsync(string tableName, string columnName, Guid? connectionId = null, CancellationToken cancellationToken = default)
Parameters
tableName
stringcolumnName
stringconnectionId
Guid?cancellationToken
CancellationToken
Returns
DropStoredProcedureAsync(string, Guid?)
public override Task DropStoredProcedureAsync(string procedureName, Guid? connectionId = null)
Parameters
Returns
GetAlterTableScript(Element, IEnumerable<ElementField>)
public override string? GetAlterTableScript(Element element, IEnumerable<ElementField> fields)
Parameters
element
Elementfields
IEnumerable<ElementField>
Returns
GetCreateTableScript(Element, List<RelationshipReference>?)
public override string GetCreateTableScript(Element element, List<RelationshipReference>? relationships = null)
Parameters
element
Elementrelationships
List<RelationshipReference>
Returns
GetDeleteCommand(Element, Dictionary<string, object>)
public override DataAccessCommand GetDeleteCommand(Element element, Dictionary<string, object> filters)
Parameters
element
Elementfilters
Dictionary<string, object>
Returns
GetElementFromTableAsync(string, Guid?)
public override Task<Element> GetElementFromTableAsync(string tableName, Guid? connectionId = null)
Parameters
Returns
GetInsertCommand(Element, Dictionary<string, object?>)
public override DataAccessCommand GetInsertCommand(Element element, Dictionary<string, object?> values)
Parameters
element
Elementvalues
Dictionary<string, object>
Returns
GetInsertOrReplaceCommand(Element, Dictionary<string, object?>)
protected override DataAccessCommand GetInsertOrReplaceCommand(Element element, Dictionary<string, object?> values)
Parameters
element
Elementvalues
Dictionary<string, object>
Returns
GetReadCommand(Element, EntityParameters, DataAccessParameter)
public override DataAccessCommand GetReadCommand(Element element, EntityParameters parameters, DataAccessParameter totalOfRecordsParameter)
Parameters
element
Elementparameters
EntityParameterstotalOfRecordsParameter
DataAccessParameter
Returns
GetReadProcedureScript(Element)
public override string GetReadProcedureScript(Element element)
Parameters
element
Element
Returns
GetStoredProcedureDefinitionAsync(string, Guid?)
public override Task<string?> GetStoredProcedureDefinitionAsync(string procedureName, Guid? connectionId = null)
Parameters
Returns
GetStoredProcedureListAsync(Guid?)
public override Task<List<string>> GetStoredProcedureListAsync(Guid? connectionId = null)
Parameters
connectionId
Guid?
Returns
GetUpdateCommand(Element, Dictionary<string, object?>)
public override DataAccessCommand GetUpdateCommand(Element element, Dictionary<string, object?> values)
Parameters
element
Elementvalues
Dictionary<string, object>
Returns
GetWriteProcedureScript(Element)
public override string GetWriteProcedureScript(Element element)
Parameters
element
Element
Returns
TableExists(string, Guid?)
Check if table exists in the database
public override bool TableExists(string tableName, Guid? connectionId = null)
Parameters
Returns
TableExistsAsync(string, Guid?, CancellationToken)
Check if table exists in the database
public override Task<bool> TableExistsAsync(string tableName, Guid? connectionId = null, CancellationToken cancellationToken = default)
Parameters
tableName
stringconnectionId
Guid?cancellationToken
CancellationToken