C# Class Dibware.StoredProcedureFrameworkForEF.StoredProcedureDbContext

An inheritable custom DbContext that in herits from System.Data.Entity.DbContext but automatically calls the DbContextExtensions.InitializeStoredProcedureProperties extension method to initialise the stored procedures in an inherited DbContext class.
Inheritance: DbContext
Datei anzeigen Open project: dibley1973/StoredProcedureFramework

Public Methods

Method Description
StoredProcedureDbContext ( DbConnection existingConnection, DbCompiledModel model, bool contextOwnsConnection ) : System.Data.Common

Constructs a new Dibware.StoredProcedureFrameworkForEF.StoredProcedureDbContext instance using the existing connection to connect to a database, and initializes it from the given model. The connection will not be disposed when the context is disposed if contextOwnsConnection is false.

StoredProcedureDbContext ( ObjectContext objectContext, bool dbContextOwnsObjectContext ) : System.Data.Common

Constructs a new Dibware.StoredProcedureFrameworkForEF.StoredProcedureDbContext instance around an existing ObjectContext.

StoredProcedureDbContext ( string nameOrConnectionString, DbCompiledModel model ) : System.Data.Common

Constructs a new Dibware.StoredProcedureFrameworkForEF.StoredProcedureDbContext instance using the given string as the name or connection string for the database to which a connection will be made, and initializes it from the given model.

Protected Methods

Method Description
StoredProcedureDbContext ( DbCompiledModel model ) : System.Data.Common

Constructs a new Dibware.StoredProcedureFrameworkForEF.StoredProcedureDbContext instance using conventions to create the name of the database to which a connection will be made, and initializes it from the given model. The by-convention name is the full name (namespace + class name) of the derived context class. See the class remarks for how this is used to create a connection.

StoredProcedureDbContext ( DbConnection existingConnection, bool contextOwnsConnection ) : System.Data.Common

Constructs a new Dibware.StoredProcedureFrameworkForEF.StoredProcedureDbContext instance using the existing connection to connect to a database. The connection will not be disposed when the context is disposed if contextOwnsConnection is false.

StoredProcedureDbContext ( string nameOrConnectionString ) : System.Data.Common

Constructs a new Dibware.StoredProcedureFrameworkForEF.StoredProcedureDbContext instance using the given string as the name or connection string for the database to which a connection will be made.

Method Details

StoredProcedureDbContext() protected method

Constructs a new Dibware.StoredProcedureFrameworkForEF.StoredProcedureDbContext instance using conventions to create the name of the database to which a connection will be made, and initializes it from the given model. The by-convention name is the full name (namespace + class name) of the derived context class. See the class remarks for how this is used to create a connection.
protected StoredProcedureDbContext ( DbCompiledModel model ) : System.Data.Common
model DbCompiledModel The model that will back this context.
return System.Data.Common

StoredProcedureDbContext() public method

Constructs a new Dibware.StoredProcedureFrameworkForEF.StoredProcedureDbContext instance using the existing connection to connect to a database, and initializes it from the given model. The connection will not be disposed when the context is disposed if contextOwnsConnection is false.
public StoredProcedureDbContext ( DbConnection existingConnection, DbCompiledModel model, bool contextOwnsConnection ) : System.Data.Common
existingConnection System.Data.Common.DbConnection An existing connection to use for the new context.
model DbCompiledModel The model that will back this context.
contextOwnsConnection bool /// If set to true the connection is disposed when the context is disposed, otherwise the caller must dispose the connection. ///
return System.Data.Common

StoredProcedureDbContext() protected method

Constructs a new Dibware.StoredProcedureFrameworkForEF.StoredProcedureDbContext instance using the existing connection to connect to a database. The connection will not be disposed when the context is disposed if contextOwnsConnection is false.
protected StoredProcedureDbContext ( DbConnection existingConnection, bool contextOwnsConnection ) : System.Data.Common
existingConnection System.Data.Common.DbConnection An existing connection to use for the new context.
contextOwnsConnection bool /// If set to true the connection is disposed when the context is disposed, otherwise the caller must dispose the connection. ///
return System.Data.Common

StoredProcedureDbContext() public method

Constructs a new Dibware.StoredProcedureFrameworkForEF.StoredProcedureDbContext instance around an existing ObjectContext.
public StoredProcedureDbContext ( ObjectContext objectContext, bool dbContextOwnsObjectContext ) : System.Data.Common
objectContext ObjectContext An existing ObjectContext to wrap with the new context.
dbContextOwnsObjectContext bool /// If set to true the ObjectContext is disposed when the DbContext is disposed, otherwise the caller must dispose the connection. ///
return System.Data.Common

StoredProcedureDbContext() protected method

Constructs a new Dibware.StoredProcedureFrameworkForEF.StoredProcedureDbContext instance using the given string as the name or connection string for the database to which a connection will be made.
protected StoredProcedureDbContext ( string nameOrConnectionString ) : System.Data.Common
nameOrConnectionString string Either the database name or a connection string.
return System.Data.Common

StoredProcedureDbContext() public method

Constructs a new Dibware.StoredProcedureFrameworkForEF.StoredProcedureDbContext instance using the given string as the name or connection string for the database to which a connection will be made, and initializes it from the given model.
public StoredProcedureDbContext ( string nameOrConnectionString, DbCompiledModel model ) : System.Data.Common
nameOrConnectionString string Either the database name or a connection string.
model DbCompiledModel The model that will back this context.
return System.Data.Common