RGDataContext Class

Wrapper class for default Data Context from the web.config setting.

Definition

Namespace: Recrovit.RecroGridFramework.Data
Assembly: Recrovit.RecroGrid (in Recrovit.RecroGrid.dll) Version: 8.0.0.24.0403.1
C#
public class RGDataContext : RGDataContextBase, 
	IRGDataContext, IDisposable
Inheritance
Object    RGDataContextBase    RGDataContext
Implements
IRGDataContext, IDisposable

Constructors

RGDataContext Initializes a new instance of the RGDataContext class.

Properties

AutoMigrateRGFDatabase Gets or sets a value indicating whether automatic migration of the RGF database is enabled.
Connection Returns the connection being used by this context.
(Inherited from RGDataContextBase)
ConnectionNameDBType Determines the database type from the ConnectionString name.
Context Gets the Database context.
(Overrides RGDataContextBaseContext)
DataContext Gets the data context.
(Inherited from RGDataContextBase)
DefaultConnectionName Gets the default name of the connection to database.
DefaultConnectionString Gets or sets the default connection string.
DefaultDbContextType Gets or sets the default type of the database context.
EntityNames Gets the entity names.
(Inherited from RGDataContextBase)
EntityTypes Gets the entity types.
(Inherited from RGDataContextBase)
IsDatabaseInitialized Gets a value indicating whether database is initialized.
NoTracking Gets a value indicating whether [no tracking].
(Overrides RGDataContextBaseNoTracking)
RecroGridTypeList Gets the list of RecroGrid types.
SQLTimeoutGets or sets the SQL timeout.

Methods

AddDbContextPoolTypeTContextService, TContextImplementation Adds the type of the database context pool.
AddObjectTEntity Adds an object to the object context.
(Inherited from RGDataContextBase)
CustomDatabaseInitialization RGF adatbázis inicializálás után futtatható egyedi inicializálás. A visszatérési érték megjelenik a képernyőn.
DeleteObjectTEntity Marks an object for deletion.
(Inherited from RGDataContextBase)
Dispose Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Dispose(Boolean) Releases unmanaged and - optionally - managed resources.
EqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
ExecuteStoreCommand Executes an arbitrary command directly against the data source using the existing connection. The command is specified using the server's native query language, such as SQL. As with any API that accepts SQL it is important to parameterize any user input to protect against a SQL injection attack. You can include parameter place holders in the SQL query string and then supply parameter values as additional arguments. Any parameter values you supply will automatically be converted to a DbParameter. context.ExecuteStoreCommand("UPDATE dbo.Posts SET Rating = 5 WHERE Author = @p0", userSuppliedAuthor); Alternatively, you can also construct a DbParameter and supply it to SqlQuery. This allows you to use named parameters in the SQL query string. context.ExecuteStoreCommand("UPDATE dbo.Posts SET Rating = 5 WHERE Author = @author", new SqlParameter("@author", userSuppliedAuthor));
(Inherited from RGDataContextBase)
ExecuteStoreCommandAsync Asynchronously executes an arbitrary command directly against the data source using the existing connection. The command is specified using the server's native query language, such as SQL. As with any API that accepts SQL it is important to parameterize any user input to protect against a SQL injection attack. You can include parameter place holders in the SQL query string and then supply parameter values as additional arguments. Any parameter values you supply will automatically be converted to a DbParameter. context.ExecuteStoreCommandAsync("UPDATE dbo.Posts SET Rating = 5 WHERE Author = @p0", userSuppliedAuthor); Alternatively, you can also construct a DbParameter and supply it to SqlQuery. This allows you to use named parameters in the SQL query string. context.ExecuteStoreCommandAsync("UPDATE dbo.Posts SET Rating = 5 WHERE Author = @author", new SqlParameter("@author", userSuppliedAuthor));
(Inherited from RGDataContextBase)
Finalize Finalizes an instance of the RGDataContext class.
(Overrides ObjectFinalize)
GetHashCodeServes as the default hash function.
(Inherited from Object)
GetObjectByKeyTEntity Returns an object that has the specified entity key.
(Inherited from RGDataContextBase)
GetTypeGets the Type of the current instance.
(Inherited from Object)
MemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
SaveChangesAsync(CancellationToken) Saves all changes made in this context to the database. This method will automatically call Microsoft.EntityFrameworkCore.ChangeTracking.ChangeTracker.DetectChanges to discover any changes to entity instances before saving to the underlying database. This can be disabled via Microsoft.EntityFrameworkCore.ChangeTracking.ChangeTracker.AutoDetectChangesEnabled. Multiple active operations on the same context instance are not supported. Use 'await' to ensure that any asynchronous operations have completed before calling another method on this context.
(Inherited from RGDataContextBase)
SaveChangesAsync(Boolean, CancellationToken) Saves all changes made in this context to the database. This method will automatically call Microsoft.EntityFrameworkCore.ChangeTracking.ChangeTracker.DetectChanges to discover any changes to entity instances before saving to the underlying database. This can be disabled via Microsoft.EntityFrameworkCore.ChangeTracking.ChangeTracker.AutoDetectChangesEnabled. Multiple active operations on the same context instance are not supported. Use 'await' to ensure that any asynchronous operations have completed before calling another method on this context.
(Inherited from RGDataContextBase)
SelectTEntity Projects each element of a sequence into a new form.
(Inherited from RGDataContextBase)
SetDefaultNamespace(Type) Sets the default namespace and Assembly name.
SetDefaultNamespace(String, String) Sets the default namespace and Assembly name.
ToStringReturns a string that represents the current object.
(Inherited from Object)

See Also