DataContext Class Members
The following tables list the members exposed by DataContext.
| Name | Description |
![Public Property](template/packages/core-dotnet/images/publicProperty.png) | ChangeConflicts | Returns a collection of objects that caused concurrency conflicts when SubmitChanges was called. |
![Public Property](template/packages/core-dotnet/images/publicProperty.png) | CommandTimeout | Increases the time-out period for queries that would otherwise time out during the default time-out period. |
![Public Property](template/packages/core-dotnet/images/publicProperty.png) | Connection | Returns the connection used by the framework. |
![Public Property](template/packages/core-dotnet/images/publicProperty.png) | DeferredLoadingEnabled | Instructs the framework not to delay-load one-to-many or one-to-one relationships. |
![Public Property](template/packages/core-dotnet/images/publicProperty.png) | EntityCachingMode | Determines how context's entity cache works. |
![Public Property](template/packages/core-dotnet/images/publicProperty.png) | Errors | Gets the collection of errors, occurred while performing the SubmitChanges operation and not processed in the OnSubmitError event. |
![Public Property](template/packages/core-dotnet/images/publicProperty.png) | HasErrors | Indicates whether there are unprocessed errors, occurred during SubmitChanges operation. |
![Public Property](template/packages/core-dotnet/images/publicProperty.png) | LoadOptions | Gets or sets the DataLoadOptions associated with this DataContext. |
![Public Property](template/packages/core-dotnet/images/publicProperty.png) | Log | Prints the SQL query or command to the TextReader. |
![Public Property](template/packages/core-dotnet/images/publicProperty.png) | Mapping | Returns the MetaModel on which the mapping is based. |
![Public Property](template/packages/core-dotnet/images/publicProperty.png) | MaxBatchSize | Gets or sets the max number of queries, united in the batch for speeding up the SubmitChanges operation. |
![Public Property](template/packages/core-dotnet/images/publicProperty.png) | MaxUsedConnections | Gets or sets the maximal number of opened connections. |
![Public Property](template/packages/core-dotnet/images/publicProperty.png) | ObjectTrackingEnabled | Instructs the framework to track the original value and object identity for this DataContext. |
![Public Property](template/packages/core-dotnet/images/publicProperty.png) | Transaction | Sets a local transaction for the .NET Framework to use to access the database. |
Top
| Name | Description |
![Public Method](template/packages/core-dotnet/images/publicMethod.png) | CreateDatabase | Overloaded. Creates and executes script that creates database tables with their constraints, indexes, and foreign keys. |
![Public Method](template/packages/core-dotnet/images/publicMethod.png) | DatabaseExists | Returns true if an attempt to open the database by using the connection in the DataContext succeeds. |
![Public Method](template/packages/core-dotnet/images/publicMethod.png) | DeleteDatabase | Overloaded. Creates and executes script that deletes database tables with their constraints, indexes, and foreign keys. |
![Public Method](template/packages/core-dotnet/images/publicMethod.png) | Dispose | Releases all resources used by the DataContext. |
![Public Method](template/packages/core-dotnet/images/publicMethod.png) | ExecuteCommand | Executes SQL commands directly on the database. |
![Public Method](template/packages/core-dotnet/images/publicMethod.png) | ExecuteQuery | Overloaded. Executes SQL queries directly on the database. |
![Public Method](template/packages/core-dotnet/images/publicMethod.png) | GetChangeSet | Provides access to the modified objects tracked by DataContext. |
![Public Method](template/packages/core-dotnet/images/publicMethod.png) | GetCommand | Provides information about SQL commands generated by LINQ to SQL. |
![Public Method](template/packages/core-dotnet/images/publicMethod.png) | GetTable | Overloaded. Returns a collection of table objects. |
![Public Method](template/packages/core-dotnet/images/publicMethod.png) | Query<TResult> | Executes SQL query against the database, with data fetching delayed until they will be accessed through the IQueryable interface. |
![Public Method](template/packages/core-dotnet/images/publicMethod.png) | Refresh | Overloaded. Refreshes object state by using data in the database. |
![Public Method](template/packages/core-dotnet/images/publicMethod.png) | RejectChanges | Cancels all unsubmitted changes to the DataContext entities. |
![Public Method](template/packages/core-dotnet/images/publicMethod.png) | SubmitChanges | Overloaded. Computes the set of modified objects to be inserted, updated, or deleted, and executes the appropriate commands to implement the changes to the database. |
![Public Method](template/packages/core-dotnet/images/publicMethod.png) | Translate | Overloaded. Converts an existing IDataReader to objects. |
Top