Interface IDataProvider
Assembly: linq2db.dll
Syntax
public interface IDataProvider
Properties
|
Improve this Doc
View Source
ConnectionNamespace
Declaration
string? ConnectionNamespace { get; }
Property Value
Type |
Description |
System.Nullable<System.String> |
|
|
Improve this Doc
View Source
DataReaderType
Declaration
Type DataReaderType { get; }
Property Value
|
Improve this Doc
View Source
ID
Declaration
Property Value
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
MappingSchema
Declaration
MappingSchema MappingSchema { get; }
Property Value
|
Improve this Doc
View Source
Name
Declaration
Property Value
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
SqlProviderFlags
Declaration
SqlProviderFlags SqlProviderFlags { get; }
Property Value
|
Improve this Doc
View Source
SupportedTableOptions
Declaration
TableOptions SupportedTableOptions { get; }
Property Value
|
Improve this Doc
View Source
TransactionsSupported
Declaration
bool TransactionsSupported { get; }
Property Value
Type |
Description |
System.Boolean |
|
Methods
|
Improve this Doc
View Source
BulkCopy<T>(DataOptions, ITable<T>, IEnumerable<T>)
Declaration
BulkCopyRowsCopied BulkCopy<T>(DataOptions options, ITable<T> table, IEnumerable<T> source)
Parameters
Returns
Type Parameters
|
Improve this Doc
View Source
BulkCopyAsync<T>(DataOptions, ITable<T>, IEnumerable<T>, CancellationToken)
Declaration
Task<BulkCopyRowsCopied> BulkCopyAsync<T>(DataOptions options, ITable<T> table, IEnumerable<T> source, CancellationToken cancellationToken)
Parameters
Type |
Name |
Description |
DataOptions |
options |
|
ITable<T> |
table |
|
IEnumerable<T> |
source |
|
CancellationToken |
cancellationToken |
|
Returns
Type Parameters
|
Improve this Doc
View Source
ConvertParameterType(Type, DbDataType)
Declaration
Type ConvertParameterType(Type type, DbDataType dataType)
Parameters
Type |
Name |
Description |
Type |
type |
|
DbDataType |
dataType |
|
Returns
|
Improve this Doc
View Source
CreateConnection(String)
Declaration
DbConnection CreateConnection(string connectionString)
Parameters
Type |
Name |
Description |
System.String |
connectionString |
|
Returns
Type |
Description |
DbConnection |
|
|
Improve this Doc
View Source
CreateSqlBuilder(MappingSchema, DataOptions)
Declaration
ISqlBuilder CreateSqlBuilder(MappingSchema mappingSchema, DataOptions dataOptions)
Parameters
Returns
|
Improve this Doc
View Source
DisposeCommand(DbCommand)
Declaration
void DisposeCommand(DbCommand command)
Parameters
Type |
Name |
Description |
DbCommand |
command |
|
|
Improve this Doc
View Source
ExecuteScope(DataConnection)
Returns scoped context object to wrap calls of Execute* methods.
Using this, provider could e.g. change thread culture during Execute* calls.
Following calls wrapped right now:
DataConnection.ExecuteNonQuery
DataConnection.ExecuteReader.
Declaration
IExecutionScope ExecuteScope(DataConnection dataConnection)
Parameters
Type |
Name |
Description |
DataConnection |
dataConnection |
Data connection instance used with scope.
|
Returns
Type |
Description |
IExecutionScope |
Returns disposable scope object. Can be null .
|
|
Improve this Doc
View Source
GetCommandBehavior(CommandBehavior)
Declaration
CommandBehavior GetCommandBehavior(CommandBehavior commandBehavior)
Parameters
Type |
Name |
Description |
CommandBehavior |
commandBehavior |
|
Returns
Type |
Description |
CommandBehavior |
|
|
Improve this Doc
View Source
GetConnectionInfo(DataConnection, String)
Declaration
object? GetConnectionInfo(DataConnection dataConnection, string parameterName)
Parameters
Type |
Name |
Description |
DataConnection |
dataConnection |
|
System.String |
parameterName |
|
Returns
Type |
Description |
System.Nullable<System.Object> |
|
|
Improve this Doc
View Source
GetReaderExpression(DbDataReader, Int32, Expression, Type)
Declaration
Expression GetReaderExpression(DbDataReader reader, int idx, Expression readerExpression, Type toType)
Parameters
Type |
Name |
Description |
DbDataReader |
reader |
|
System.Int32 |
idx |
|
Expression |
readerExpression |
|
Type |
toType |
|
Returns
Type |
Description |
Expression |
|
|
Improve this Doc
View Source
GetSchemaProvider()
Declaration
ISchemaProvider GetSchemaProvider()
Returns
|
Improve this Doc
View Source
GetSqlOptimizer(DataOptions)
Declaration
ISqlOptimizer GetSqlOptimizer(DataOptions dataOptions)
Parameters
Returns
|
Improve this Doc
View Source
InitCommand(DataConnection, DbCommand, CommandType, String, DataParameter[], Boolean)
Declaration
DbCommand InitCommand(DataConnection dataConnection, DbCommand command, CommandType commandType, string commandText, DataParameter[] parameters, bool withParameters)
Parameters
Type |
Name |
Description |
DataConnection |
dataConnection |
Data connection instance to initialize with new command.
|
DbCommand |
command |
Command instance to initialize.
|
CommandType |
commandType |
Type of command.
|
System.String |
commandText |
Command SQL.
|
DataParameter[] |
parameters |
Optional list of parameters to add to initialized command.
|
System.Boolean |
withParameters |
Flag to indicate that command has parameters. Used to configure parameters support when method called without parameters and parameters added later to command.
|
Returns
Type |
Description |
DbCommand |
Initialized command instance.
|
|
Improve this Doc
View Source
InitContext(IDataContext)
Declaration
void InitContext(IDataContext dataContext)
Parameters
|
Improve this Doc
View Source
IsDBNullAllowed(DataOptions, DbDataReader, Int32)
Declaration
bool? IsDBNullAllowed(DataOptions options, DbDataReader reader, int idx)
Parameters
Type |
Name |
Description |
DataOptions |
options |
|
DbDataReader |
reader |
|
System.Int32 |
idx |
|
Returns
Type |
Description |
System.Nullable<System.Boolean> |
|
|
Improve this Doc
View Source
SetParameter(DataConnection, DbParameter, String, DbDataType, Nullable<Object>)
Declaration
void SetParameter(DataConnection dataConnection, DbParameter parameter, string name, DbDataType dataType, object? value)
Parameters
Type |
Name |
Description |
DataConnection |
dataConnection |
|
DbParameter |
parameter |
|
System.String |
name |
|
DbDataType |
dataType |
|
System.Nullable<System.Object> |
value |
|
Extension Methods