Table of Contents

Class RemoteDataContextBase

Namespace
LinqToDB.Remote
Assembly
linq2db.dll
public abstract class RemoteDataContextBase : IDataContext, IConfigurationID, IDisposable, IAsyncDisposable, IInterceptable<IDataContextInterceptor>, IInterceptable<IEntityServiceInterceptor>, IInterceptable<IUnwrapDataObjectInterceptor>, IInterceptable
Inheritance
RemoteDataContextBase
Implements
Extension Methods

Constructors

RemoteDataContextBase(DataOptions)

protected RemoteDataContextBase(DataOptions options)

Parameters

options DataOptions

Properties

CloseAfterUse

Gets or sets flag to close context after query execution or leave it open.

public bool CloseAfterUse { get; set; }

Property Value

bool

Configuration

[Obsolete("Use ConfigurationString instead.")]
public string? Configuration { get; set; }

Property Value

string

ConfigurationString

Gets initial value for database connection configuration name.

public string? ConfigurationString { get; set; }

Property Value

string

ContextIDPrefix

protected abstract string ContextIDPrefix { get; }

Property Value

string

Disposed

protected bool Disposed { get; }

Property Value

bool

GetSqlOptimizer

Gets SQL optimizer service factory method for current context data provider.

public Func<DataOptions, ISqlOptimizer> GetSqlOptimizer { get; }

Property Value

Func<DataOptions, ISqlOptimizer>

InlineParameters

Gets or sets option to force inline parameter values as literals into command text. If parameter inlining not supported for specific value type, it will be used as parameter.

public bool InlineParameters { get; set; }

Property Value

bool

MappingSchema

Gets mapping schema, used for current context.

public MappingSchema MappingSchema { get; set; }

Property Value

MappingSchema

NextQueryHints

Gets list of query hints (writable collection), that will be used only for next query, executed using current context.

public List<string> NextQueryHints { get; }

Property Value

List<string>

Options

Current DataContext LINQ options

public DataOptions Options { get; }

Property Value

DataOptions

QueryHints

Gets list of query hints (writable collection), that will be used for all queries, executed using current context.

public List<string> QueryHints { get; }

Property Value

List<string>

SqlOptimizerType

public virtual Type SqlOptimizerType { get; set; }

Property Value

Type

SqlProviderType

public virtual Type SqlProviderType { get; set; }

Property Value

Type

Methods

AddInterceptor(IInterceptor)

Adds interceptor instance to context.

public void AddInterceptor(IInterceptor interceptor)

Parameters

interceptor IInterceptor

Interceptor.

BeginBatch()

public void BeginBatch()

Clone()

protected abstract IDataContext Clone()

Returns

IDataContext

CommitBatch()

public void CommitBatch()

CommitBatchAsync()

public Task CommitBatchAsync()

Returns

Task

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public virtual void Dispose()

DisposeAsync()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources asynchronously.

public virtual Task DisposeAsync()

Returns

Task

GetClient()

protected abstract ILinqService GetClient()

Returns

ILinqService

RemoveInterceptor(IInterceptor)

Removes interceptor instance from context.

public void RemoveInterceptor(IInterceptor interceptor)

Parameters

interceptor IInterceptor

Interceptor.

ThrowOnDisposed()

protected void ThrowOnDisposed()