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
record
IDictionary<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
record
IDictionary<string, object>The dictionary.
keyColumnNames
string[]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
commandBuilder
CommandBuilderThe 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
tableName
stringName of the table.
tableColumnNames
IEnumerable<string>The table column names.
tableLookupColumnName
stringName of the table lookup column.
tableLookupValue
TThe table lookup value.
Returns
Type Parameters
T
Type 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
tableName
stringName of the table.
tableKeyColumnName
stringName of the table key column.
tableValueColumnName
stringName of the table value column.
tableLookupColumnName
stringName of the table lookup column.
tableLookupValue
TThe table lookup value.
Returns
Type Parameters
T
Type of the lookup value