Class SqlDataProviderBase
- Namespace
- Dynamicweb.Data.DataProviders
- Assembly
- Dynamicweb.Core.dll
Base class for providers of sql data.
public abstract class SqlDataProviderBase : DataProvider
- Inheritance
-
SqlDataProviderBase
- Derived
- Inherited Members
Methods
ConvertToDataItem(IDictionary<string, object>)
Converts a dictionary into a data item.
public virtual DataItem ConvertToDataItem(IDictionary<string, object> record)
Parameters
recordIDictionary<string, object>The dictionary.
Returns
- DataItem
Data item
ConvertToDataItem(IDictionary<string, object>, params string[])
Converts a dictionary into a data item.
public virtual DataItem ConvertToDataItem(IDictionary<string, object> record, params string[] keyColumnNames)
Parameters
recordIDictionary<string, object>The dictionary.
keyColumnNamesstring[]Name of the key columns used for generating an id.
Returns
- DataItem
Data item
GetData(CommandBuilder)
Gets data from the database.
public virtual IEnumerable<Dictionary<string, object>> GetData(CommandBuilder commandBuilder)
Parameters
commandBuilderCommandBuilderThe command builder.
Returns
GetData<T>(string, IEnumerable<string>, string, T)
Gets data from the database.
public virtual IEnumerable<Dictionary<string, object>> GetData<T>(string tableName, IEnumerable<string> tableColumnNames, string tableLookupColumnName, T tableLookupValue)
Parameters
tableNamestringName of the table.
tableColumnNamesIEnumerable<string>The table column names.
tableLookupColumnNamestringName of the table lookup column.
tableLookupValueTThe table lookup value.
Returns
Type Parameters
TType of the lookup value
GetKeyValueData<T>(string, string, string, string, T)
Gets key value data from the database.
public virtual Dictionary<string, object> GetKeyValueData<T>(string tableName, string tableKeyColumnName, string tableValueColumnName, string tableLookupColumnName, T tableLookupValue)
Parameters
tableNamestringName of the table.
tableKeyColumnNamestringName of the table key column.
tableValueColumnNamestringName of the table value column.
tableLookupColumnNamestringName of the table lookup column.
tableLookupValueTThe table lookup value.
Returns
Type Parameters
TType of the lookup value