Table of Contents

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 CommandBuilder

The command builder.

Returns

IEnumerable<Dictionary<string, object>>

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 string

Name of the table.

tableColumnNames IEnumerable<string>

The table column names.

tableLookupColumnName string

Name of the table lookup column.

tableLookupValue T

The table lookup value.

Returns

IEnumerable<Dictionary<string, object>>

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 string

Name of the table.

tableKeyColumnName string

Name of the table key column.

tableValueColumnName string

Name of the table value column.

tableLookupColumnName string

Name of the table lookup column.

tableLookupValue T

The table lookup value.

Returns

Dictionary<string, object>

Type Parameters

T

Type of the lookup value

See Also

To top