Show / Hide Table of Contents

# Class IgniteDbConfiguration

System.Data.Entity.DbConfiguration implementation that uses Ignite as a second-level cache for Entity Framework queries.

##### Inheritance

System.Object
System.Data.Entity.DbConfiguration
IgniteDbConfiguration

##### Inherited Members

System.Data.Entity.DbConfiguration.SetConfiguration(System.Data.Entity.DbConfiguration)
System.Data.Entity.DbConfiguration.LoadConfiguration(System.Type)
System.Data.Entity.DbConfiguration.LoadConfiguration(System.Reflection.Assembly)
System.Data.Entity.DbConfiguration.AddDependencyResolver(System.Data.Entity.Infrastructure.DependencyResolution.IDbDependencyResolver)
System.Data.Entity.DbConfiguration.AddDefaultResolver(System.Data.Entity.Infrastructure.DependencyResolution.IDbDependencyResolver)
System.Data.Entity.DbConfiguration.SetProviderServices(System.String, System.Data.Entity.Core.Common.DbProviderServices)
System.Data.Entity.DbConfiguration.SetProviderFactory(System.String, System.Data.Common.DbProviderFactory)
System.Data.Entity.DbConfiguration.SetExecutionStrategy(System.String, System.Func<System.Data.Entity.Infrastructure.IDbExecutionStrategy>)
System.Data.Entity.DbConfiguration.SetExecutionStrategy(System.String, System.Func<System.Data.Entity.Infrastructure.IDbExecutionStrategy>, System.String)
System.Data.Entity.DbConfiguration.SetDefaultTransactionHandler(System.Func<System.Data.Entity.Infrastructure.TransactionHandler>)
System.Data.Entity.DbConfiguration.SetTransactionHandler(System.String, System.Func<System.Data.Entity.Infrastructure.TransactionHandler>)
System.Data.Entity.DbConfiguration.SetTransactionHandler(System.String, System.Func<System.Data.Entity.Infrastructure.TransactionHandler>, System.String)
System.Data.Entity.DbConfiguration.SetDefaultConnectionFactory(System.Data.Entity.Infrastructure.IDbConnectionFactory)
System.Data.Entity.DbConfiguration.SetPluralizationService(System.Data.Entity.Infrastructure.Pluralization.IPluralizationService)
System.Data.Entity.DbConfiguration.SetDatabaseInitializer<TContext>(System.Data.Entity.IDatabaseInitializer<TContext>)
System.Data.Entity.DbConfiguration.SetMigrationSqlGenerator(System.String, System.Func<System.Data.Entity.Migrations.Sql.MigrationSqlGenerator>)
System.Data.Entity.DbConfiguration.SetManifestTokenResolver(System.Data.Entity.Infrastructure.IManifestTokenResolver)
System.Data.Entity.DbConfiguration.SetMetadataAnnotationSerializer(System.String, System.Func<System.Data.Entity.Infrastructure.IMetadataAnnotationSerializer>)
System.Data.Entity.DbConfiguration.SetProviderFactoryResolver(System.Data.Entity.Infrastructure.IDbProviderFactoryResolver)
System.Data.Entity.DbConfiguration.SetModelCacheKey(System.Func<System.Data.Entity.DbContext, System.Data.Entity.Infrastructure.IDbModelCacheKey>)
System.Data.Entity.DbConfiguration.SetDefaultHistoryContext(System.Func<System.Data.Common.DbConnection, System.String, System.Data.Entity.Migrations.History.HistoryContext>)
System.Data.Entity.DbConfiguration.SetHistoryContext(System.String, System.Func<System.Data.Common.DbConnection, System.String, System.Data.Entity.Migrations.History.HistoryContext>)
System.Data.Entity.DbConfiguration.SetDefaultSpatialServices(System.Data.Entity.Spatial.DbSpatialServices)
System.Data.Entity.DbConfiguration.SetSpatialServices(System.Data.Entity.Infrastructure.DbProviderInfo, System.Data.Entity.Spatial.DbSpatialServices)
System.Data.Entity.DbConfiguration.SetSpatialServices(System.String, System.Data.Entity.Spatial.DbSpatialServices)
System.Data.Entity.DbConfiguration.SetDatabaseLogFormatter(System.Func<System.Data.Entity.DbContext, System.Action<System.String>, System.Data.Entity.Infrastructure.Interception.DatabaseLogFormatter>)
System.Data.Entity.DbConfiguration.AddInterceptor(System.Data.Entity.Infrastructure.Interception.IDbInterceptor)
System.Data.Entity.DbConfiguration.SetContextFactory(System.Type, System.Func<System.Data.Entity.DbContext>)
System.Data.Entity.DbConfiguration.SetContextFactory<TContext>(System.Func<TContext>)
System.Data.Entity.DbConfiguration.SetTableExistenceChecker(System.String, System.Data.Entity.Infrastructure.TableExistenceChecker)
System.Data.Entity.DbConfiguration.DependencyResolver
System.Data.Entity.DbConfiguration.Loaded
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()

###### Namespace: Apache.Ignite.EntityFramework

###### Assembly: Apache.Ignite.EntityFramework.dll

##### Syntax

    public class IgniteDbConfiguration : DbConfiguration

### Constructors

#### IgniteDbConfiguration()

Initializes a new instance of the IgniteDbConfiguration class.

This constructor uses default Ignite instance (with null IgniteInstanceName) and a cache with DefaultCacheNamePrefix name.

Ignite instance will be started automatically, if it is not started yet.

IgniteConfigurationSection with name Apache.Ignite.EntityFramework.IgniteDbConfiguration.ConfigurationSectionName will be picked up when starting Ignite, if present.

##### Declaration

    public IgniteDbConfiguration()

#### IgniteDbConfiguration(IgniteConfiguration, CacheConfiguration, CacheConfiguration, IDbCachingPolicy)

Initializes a new instance of the IgniteDbConfiguration class.

##### Declaration

    public IgniteDbConfiguration(IgniteConfiguration igniteConfiguration, CacheConfiguration metaCacheConfiguration, CacheConfiguration dataCacheConfiguration, IDbCachingPolicy policy)

##### Parameters

Type | Name | Description
--- | --- | ---
IgniteConfiguration | igniteConfiguration | The ignite configuration to use for starting Ignite instance.
CacheConfiguration | metaCacheConfiguration | Configuration of the metadata cache which holds entity set information. Null for default configuration. This cache holds small amount of data, but should not lose entries. At least one backup recommended.
CacheConfiguration | dataCacheConfiguration | Configuration of the data cache which holds query results. Null for default configuration. This cache tolerates lost data and can have no backups.
IDbCachingPolicy | policy | The caching policy. Null for default DbCachingPolicy.

#### IgniteDbConfiguration(IIgnite, CacheConfiguration, CacheConfiguration, IDbCachingPolicy)

Initializes a new instance of the IgniteDbConfiguration class.

##### Declaration

    public IgniteDbConfiguration(IIgnite ignite, CacheConfiguration metaCacheConfiguration, CacheConfiguration dataCacheConfiguration, IDbCachingPolicy policy)

##### Parameters

Type | Name | Description
--- | --- | ---
IIgnite | ignite | The ignite instance to use.
CacheConfiguration | metaCacheConfiguration | Configuration of the metadata cache which holds entity set information. Null for default configuration. This cache holds small amount of data, but should not lose entries. At least one backup recommended.
CacheConfiguration | dataCacheConfiguration | Configuration of the data cache which holds query results. Null for default configuration. This cache tolerates lost data and can have no backups.
IDbCachingPolicy | policy | The caching policy. Null for default DbCachingPolicy.

#### IgniteDbConfiguration(String, CacheConfiguration, CacheConfiguration, IDbCachingPolicy)

Initializes a new instance of the IgniteDbConfiguration class.

##### Declaration

    public IgniteDbConfiguration(string configurationSectionName, CacheConfiguration metaCacheConfiguration, CacheConfiguration dataCacheConfiguration, IDbCachingPolicy policy)

##### Parameters

Type | Name | Description
--- | --- | ---
System.String | configurationSectionName | Name of the configuration section.
CacheConfiguration | metaCacheConfiguration | Configuration of the metadata cache which holds entity set information. Null for default configuration. This cache holds small amount of data, but should not lose entries. At least one backup recommended.
CacheConfiguration | dataCacheConfiguration | Configuration of the data cache which holds query results. Null for default configuration. This cache tolerates lost data and can have no backups.
IDbCachingPolicy | policy | The caching policy. Null for default DbCachingPolicy.

#### IgniteDbConfiguration(String, String, IDbCachingPolicy)

Initializes a new instance of the IgniteDbConfiguration class.

##### Declaration

    public IgniteDbConfiguration(string configurationSectionName, string cacheNamePrefix, IDbCachingPolicy policy)

##### Parameters

Type | Name | Description
--- | --- | ---
System.String | configurationSectionName | Name of the configuration section.
System.String | cacheNamePrefix | The cache name prefix for Data and Metadata caches.
IDbCachingPolicy | policy | The caching policy. Null for default DbCachingPolicy.

### Fields

#### DefaultCacheNamePrefix

The default cache name to be used for cached EF data.

##### Declaration

    public const string DefaultCacheNamePrefix = "entityFrameworkQueryCache"

##### Field Value

Type | Description
--- | ---
System.String |

### Methods

#### InitializeIgniteCaching(DbConfiguration, IIgnite, CacheConfiguration, CacheConfiguration, IDbCachingPolicy)

Initializes Ignite caching for specified System.Data.Entity.DbConfiguration. This method should be used when it is not possible to use or inherit IgniteDbConfiguration.

##### Declaration

    public static void InitializeIgniteCaching(DbConfiguration dbConfiguration, IIgnite ignite, CacheConfiguration metaCacheConfiguration, CacheConfiguration dataCacheConfiguration, IDbCachingPolicy policy)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Data.Entity.DbConfiguration | dbConfiguration | System.Data.Entity.DbConfiguration instance to be initialized for Ignite caching.
IIgnite | ignite | The ignite instance to use.
CacheConfiguration | metaCacheConfiguration | Configuration of the metadata cache which holds entity set information. Null for default configuration. This cache holds small amount of data, but should not lose entries. At least one backup recommended.
CacheConfiguration | dataCacheConfiguration | Configuration of the data cache which holds query results. Null for default configuration. This cache tolerates lost data and can have no backups.
IDbCachingPolicy | policy | The caching policy. Null for default DbCachingPolicy.