Table of Contents

Class EF6Config

Namespace
Z.EntityFramework.Extensions
Assembly
Z.EntityFramework.Extensions.dll

An ef 6 configuration.

public static class EF6Config
Inheritance
EF6Config
Inherited Members

Properties

BatchSaveChangesOptionsFactory

Set default options that will apply when a BatchSaveChanges is executed.

public static Action<BatchSaveChangesOptions> BatchSaveChangesOptionsFactory { get; set; }

Property Value

Action<BatchSaveChangesOptions>

BulkOperationBuilder

Set the builder that will apply to all bulk operation instance.

public static Action<BulkOperation> BulkOperationBuilder { get; set; }

Property Value

Action<BulkOperation>

Cache

Gets or sets the cache to use.

public static ObjectCache Cache { get; set; }

Property Value

ObjectCache

The cache to use.

ContextFactory

Gets or sets the context factory. A new context must be created for internal use (DO NOT return the context from parameter).

public static Func<DbContext, DbContext> ContextFactory { get; set; }

Property Value

Func<DbContext, DbContext>

The context factory. A new context must be created for internal use (DO NOT return the context from parameter).

CustomProvider

Gets or sets the custom provider.

public static CustomProvider CustomProvider { get; set; }

Property Value

CustomProvider

The custom provider.

DefaultEntityFrameworkPropagationValue

Gets or sets a value indicating whether the default entity framework propagation should be used (setting it to false improve performance but doesn't support all model).

public static bool DefaultEntityFrameworkPropagationValue { get; set; }

Property Value

bool

True if the default entity framework propagation should be used (setting it to false improve performance but doesn't support all model), false if not.

DisableBulkCommandBatch

Gets or sets if batching command together should be disabled for methods such as BulkSaveChanges.

public static bool DisableBulkCommandBatch { get; set; }

Property Value

bool

ForceDatabaseFirst

Gets or sets a value indicating whether the current context should be forced to read as database first.

public static bool ForceDatabaseFirst { get; set; }

Property Value

bool

true if the current context should be forced to read as database first.

ForceSelectOutput

Gets or sets a value indicating whether the select output should be forced.

public static bool ForceSelectOutput { get; set; }

Property Value

bool

true if force select output, false if not.

ForceTriggerResolution

Gets or sets a value indicating whether the trigger resolution should be forced.

public static bool ForceTriggerResolution { get; set; }

Property Value

bool

True if force trigger resolution, false if not.

IsCommunity

Gets or sets a value indicating whether the library is in community mode (automatically throw an error for all paid features).

public static bool IsCommunity { get; set; }

Property Value

bool

True if the library is in community mode (automatically throw an error for all paid features).

IsEntityFrameworkPlus

Gets or sets a value indicating whether Entity Framework Plus is used.

public static bool IsEntityFrameworkPlus { get; set; }

Property Value

bool

True if Entity Framework Plus is used.

LogUniqueIndexIssue

Testing Options. Do not use.

public static Action<string> LogUniqueIndexIssue { get; set; }

Property Value

Action<string>

Testing Options. Do not use.

ModelEdmxFactory

Gets or sets the model edmx factory.

public static Func<DbContext, XDocument> ModelEdmxFactory { get; set; }

Property Value

Func<DbContext, XDocument>

A function delegate that yields an XDocument.

ModelName

Name of the model.

public static string ModelName { get; set; }

Property Value

string

ModelNameFactory

Gets or sets the model name factory.

public static Func<DbContext, string> ModelNameFactory { get; set; }

Property Value

Func<DbContext, string>

The model name factory.

PreBatchSaveChanges

Gets or sets an action to perform before the BatchSaveChanges is executed.

public static Action<DbContext> PreBatchSaveChanges { get; set; }

Property Value

Action<DbContext>

The action to perform before the BatchSaveChanges is executed.

PreBulkDelete

Gets or sets an action to perform before the BulkDelete is executed.

public static Action<DbContext, object> PreBulkDelete { get; set; }

Property Value

Action<DbContext, object>

The action to perform before the BulkDelete is executed.

PreBulkInsert

Gets or sets an action to perform before the BulkInsert is executed.

public static Action<DbContext, object> PreBulkInsert { get; set; }

Property Value

Action<DbContext, object>

The action to perform before the BulkInsert is executed.

PreBulkMerge

Gets or sets an action to perform before the BulkMerge is executed.

public static Action<DbContext, object> PreBulkMerge { get; set; }

Property Value

Action<DbContext, object>

The action to perform before the BulkMerge is executed.

PreBulkSaveChanges

Gets or sets an action to perform before the BulkSaveChanges is executed.

public static Action<DbContext> PreBulkSaveChanges { get; set; }

Property Value

Action<DbContext>

The action to perform before the BulkSaveChanges is executed.

PreBulkSynchronize

Gets or sets an action to perform before the BulkSynchronize is executed.

public static Action<DbContext, object> PreBulkSynchronize { get; set; }

Property Value

Action<DbContext, object>

The action to perform before the BulkSynchronize is executed.

PreBulkUpdate

Gets or sets an action to perform before the BulkUpdate is executed.

public static Action<DbContext, object> PreBulkUpdate { get; set; }

Property Value

Action<DbContext, object>

The action to perform before the BulkUpdate is executed.

PreserveCommandOrder

Gets or sets a value indicating whether the library should preserve topological sort order.

public static bool PreserveCommandOrder { get; set; }

Property Value

bool

True the library should preserve topological sort order, false if not.

PreserveTopologicalSortOrder

Gets or sets a value indicating whether the library should preserve topological sort order.

public static bool PreserveTopologicalSortOrder { get; set; }

Property Value

bool

True the library should preserve topological sort order, false if not.

SetDataSourceAddedAction

The set data source for Added EntityState when BulkSaveChanges is called.

public static Func<DataTable, object> SetDataSourceAddedAction { get; set; }

Property Value

Func<DataTable, object>

SetDataSourceBulkInsertAction

The set data source for bulk insert action.

public static Func<object, object> SetDataSourceBulkInsertAction { get; set; }

Property Value

Func<object, object>

SetDataSourceDeletedAction

The set data source for Removed EntityState when BulkSaveChanges is called.

public static Func<DataTable, object> SetDataSourceDeletedAction { get; set; }

Property Value

Func<DataTable, object>

SetDataSourceModifiedAction

The set data source for Modified EntityState when BulkSaveChanges is called.

public static Func<DataTable, object> SetDataSourceModifiedAction { get; set; }

Property Value

Func<DataTable, object>

TemporaryFix_ModelName

Testing Options. Do not use.

public static string TemporaryFix_ModelName { get; set; }

Property Value

string

Testing Options. Do not use.

TemporaryStringToTypeAction

Testing Options. Do not use.

public static Action<Dictionary<string, Type>> TemporaryStringToTypeAction { get; set; }

Property Value

Action<Dictionary<string, Type>>

Testing Options. Do not use.

TmpForceDatabaseFirstSingleModel

Testing Options. Do not use.

public static bool TmpForceDatabaseFirstSingleModel { get; set; }

Property Value

bool

Testing Options. Do not use.

TmpIsTransientError

Testing Options. Do not use.

public static Func<DbException, int, bool> TmpIsTransientError { get; set; }

Property Value

Func<DbException, int, bool>

Testing Options. Do not use.

TmpModelEdmx

Testing Options. Do not use.

public static string TmpModelEdmx { get; set; }

Property Value

string

Testing Options. Do not use.

TmpStoredModelEdmx

Testing Options. Do not use.

public static bool TmpStoredModelEdmx { get; set; }

Property Value

bool

Testing Options. Do not use.

UseMySqlEntityFrameworkPropagation

Gets or sets a value indicating whether the MySql Entity Framework Propagation should be used.

public static bool UseMySqlEntityFrameworkPropagation { get; set; }

Property Value

bool

True if the MySql Entity Framework Propagation should be used, false if not.

UseOldBulkSaveChanges

true to use old bulk save changes.

public static bool UseOldBulkSaveChanges { get; set; }

Property Value

bool

UseToListMemoryOptimized

Gets or sets a value indicating whether the method ToListMemoryOptimized will be used instead of ToList to fix some LOH issue.

public static bool UseToListMemoryOptimized { get; set; }

Property Value

bool

True if the method ToListMemoryOptimized will be used instead of ToList to fix some LOH issue.

Methods

AddLicense(string, string)

Adds a license key (Multiple license key can be added).

public static void AddLicense(string licenseName, string licenseKey)

Parameters

licenseName string

Name of the license.

licenseKey string

The license key.

LoadSqlTypeAssembly()

Loads SQL type assembly.

public static void LoadSqlTypeAssembly()

TryBatchTopologicalSort<TVertex>(object)

Internal Public Method

public static object TryBatchTopologicalSort<TVertex>(object orderer)

Parameters

orderer object

Returns

object

Type Parameters

TVertex

TryTopologicalSort<TVertex>(object)

Internal Public Method

public static object TryTopologicalSort<TVertex>(object orderer)

Parameters

orderer object

Returns

object

Type Parameters

TVertex

UseFiddleSqlCompact(object, object)

public static void UseFiddleSqlCompact(object sqlCeProviderServicesInstance, object sqlCeProviderFactoryInstance)

Parameters

sqlCeProviderServicesInstance object
sqlCeProviderFactoryInstance object

ValidateLicense(out string, ProviderType)

Validates if license added is valid.

public static bool ValidateLicense(out string errorMessage, ProviderType provider = ProviderType.SqlServer)

Parameters

errorMessage string

[out] The error message when the license is invalid.

provider ProviderType

(Optional) The provider specific for the license.

Returns

bool

true if it's valid, false if it's invalid.

ValidateLicense(ProviderType)

Validates if license added is valid.

public static bool ValidateLicense(ProviderType provider = ProviderType.SqlServer)

Parameters

provider ProviderType

(Optional) The provider specific for the license.

Returns

bool

true if it's valid, false if it's invalid.