Click or drag to resize

RGDataContext Class

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

Namespace:  Recrovit.RecroGridFramework.Data
Assembly:  Recrovit.RecroGrid (in Recrovit.RecroGrid.dll) Version: 1.7.3
Syntax
C#
public class RGDataContext : RGDataContextBase, 
	IRGDataContext, IDisposable

The RGDataContext type exposes the following members.

Constructors
  NameDescription
Public methodRGDataContext
Initializes a new instance of the RGDataContext class.
Top
Properties
  NameDescription
Public propertyConnection
Returns the connection being used by this context.
(Inherited from RGDataContextBase.)
Public propertyStatic memberConnectionNameDBType
Meghatározza az adatbázis típusát a ConnectionString nevéből.
Public propertyContext
Gets the Database context.
(Overrides RGDataContextBaseContext.)
Public propertyStatic memberDefaultConnectionName
Gets the default name of the connection to database.
Public propertyStatic memberDefaultConnectionString
Gets or sets the default connection string.
Public propertyStatic memberDefaultDbContextType
Gets or sets the default type of the database context.
Public propertyEntityNames
Gets the entity names.
(Inherited from RGDataContextBase.)
Public propertyEntityTypes
Gets the entity types.
(Inherited from RGDataContextBase.)
Public propertyStatic memberIsDatabaseInitialized
Gets a value indicating whether database is initialized.
Public propertyNoTracking
Gets a value indicating whether [no tracking].
(Overrides RGDataContextBaseNoTracking.)
Public propertyStatic memberRecroGridTypeList
Gets the list of RecroGrid types.
Public propertyStatic memberSQLTimeout
Gets or sets the SQL timeout.
Top
Methods
  NameDescription
Public methodAddObjectTEntity
Adds an object to the object context.
(Inherited from RGDataContextBase.)
Public methodCreateQuery (Inherited from RGDataContextBase.)
Public methodStatic memberCustomDatabaseInitialization
RGF adatbázis inicializálás után futtatható egyedi inicializálás. A visszatérési érték megjelenik a képernyőn.
Public methodDeleteObjectTEntity
Marks an object for deletion.
(Inherited from RGDataContextBase.)
Public methodDispose
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Protected methodDispose(Boolean)
Releases unmanaged and - optionally - managed resources.
Public methodExecuteStoreCommand
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.)
Public methodExecuteStoreCommandAsync
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.)
Public methodExecuteStoreQueryTElement Obsolete.
Executes a query directly against the data source and returns a sequence of typed results. The query is specified using the server's native query language, such as SQL. Results are not tracked by the context, use the overload that specifies an entity set name to track results. 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.ExecuteStoreQuery<Post>("SELECT * FROM dbo.Posts 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.ExecuteStoreQuery<Post>("SELECT * FROM dbo.Posts WHERE Author = @author", new SqlParameter("@author", userSuppliedAuthor));
(Inherited from RGDataContextBase.)
Protected methodFinalize
Finalizes an instance of the RGDataContext class.
(Overrides ObjectFinalize.)
Public methodGetObjectByKeyTEntity
Returns an object that has the specified entity key.
(Inherited from RGDataContextBase.)
Public methodSaveChanges
Saves all changes made in this context to the underlying database.
(Inherited from RGDataContextBase.)
Public methodSelectTEntity
Projects each element of a sequence into a new form.
(Inherited from RGDataContextBase.)
Public methodSelectValueTResultType
Limits the query results to only the property specified in the projection.
(Inherited from RGDataContextBase.)
Public methodStatic memberSetDefaultNamespace(Type)
Sets the default namespace and Assembly name.
Public methodStatic memberSetDefaultNamespace(String, String)
Sets the default namespace and Assembly name.
Top
See Also