This documentation is archived and is not being maintained.

DataContext Members

Visual Studio 2008

Represents the main entry point for the LINQ to SQL framework.

The DataContext type exposes the following members.

  NameDescription
Public method DataContext Overloaded. Initializes a new instance of the DataContext class.
Top

  NameDescription
Public method CreateDatabase Creates a database on the server.
Protected method CreateMethodCallQuery<TResult> Infrastructure. Executes the table-valued database function associated with the specified CLR method.
Public method DatabaseExists Determines whether the associated database can be opened.
Public method DeleteDatabase Deletes the associated database.
Public method Dispose Overloaded. Releases all resources used by the DataContext.
Public method Equals Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Public method ExecuteCommand Executes SQL commands directly on the database.
Protected method ExecuteDynamicDelete Called inside delete override methods to redelegate to LINQ to SQL the task of generating and executing dynamic SQL for delete operations.
Protected method ExecuteDynamicInsert Called inside insert override methods to redelegate to LINQ to SQL the task of generating and executing dynamic SQL for insert operations.
Protected method ExecuteDynamicUpdate Called inside update override methods to redelegate to LINQ to SQL the task of generating and executing dynamic SQL for update operations.
Protected method ExecuteMethodCall Infrastructure. Executes the stored database procedure or scalar function associated with the specified CLR method.
Public method ExecuteQuery Overloaded. Executes SQL queries directly on the database.
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method GetChangeSet Provides access to the modified objects tracked by DataContext.
Public method GetCommand Provides information about SQL commands generated by LINQ to SQL.
Public method GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public method GetTable Overloaded. Returns a collection of table objects.
Public method GetType Gets the type of the current instance. (Inherited from Object.)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method Refresh Overloaded. Refreshes object state by using data in the database.
Public method 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 ToString Returns a string that represents the current object. (Inherited from Object.)
Public method Translate Overloaded. Converts an existing IDataReader to objects.
Top

  NameDescription
Public property ChangeConflicts Returns a collection of objects that caused concurrency conflicts when SubmitChanges was called.
Public property CommandTimeout Increases the time-out period for queries that would otherwise time out during the default time-out period.
Public property Connection Returns the connection used by the framework.
Public property DeferredLoadingEnabled Specifies whether to delay-load one-to-many or one-to-one relationships.
Public property LoadOptions Gets or sets the DataLoadOptions associated with this DataContext.
Public property Log Specifies the destination to write the SQL query or command.
Public property Mapping Returns the MetaModel on which the mapping is based.
Public property ObjectTrackingEnabled Instructs the framework to track the original value and object identity for this DataContext.
Public property Transaction Sets a local transaction for the .NET Framework to use to access the database.
Top
Show: