Condividi tramite


DataContext Members

Include Protected Members
Include Inherited Members

Provides LINQ (Language Integrated Query) access to, and change tracking for, the lists and document libraries of a Microsoft SharePoint Foundation Web site.

The DataContext type exposes the following members.

Constructors

  Name Description
Public method DataContext Initializes a new instance of the DataContext class that provides access and change tracking for the specified Web site.

Top

Properties

  Name Description
Public property ChangeConflicts Gets a collection of objects that represent discrepancies between the current client value and the current database value of a field in a list item.
Public property DeferredLoadingEnabled Gets or sets a value indicating whether the LINQ to SharePoint provider should allow delay loading of EntityRef<TEntity> and EntitySet<TEntity> objects.
Public property Log Gets or sets an object that will write the Collaborative Application Markup Language (CAML) query that results from the translation of the LINQ query.
Public property ObjectTrackingEnabled Gets or sets a value that indicates whether changes in objects are tracked.
Public property Web Gets the full URL of the Web site whose data is represented by the DataContext object.

Top

Methods

  Name Description
Public method Dispose() Releases all managed and unmanaged resources used by the DataContext object.
Protected method Dispose(Boolean) Releases all unmanaged resources used by the DataContext object and possibly also the managed resources as specified.
Public method Equals (Inherited from Object.)
Protected method Finalize Releases all unmanaged resources used by the DataContext object. (Overrides Object.Finalize().)
Public method GetHashCode (Inherited from Object.)
Public method GetList<T> Returns an object that represents the specified list and is queryable by LINQ (Language Integrated Query).
Public method GetType (Inherited from Object.)
Protected method MemberwiseClone (Inherited from Object.)
Public method Refresh(RefreshMode, IEnumerable) Refreshes a collection of entities with the latest data from the content database according to the specified mode.
Public method Refresh(RefreshMode, Object) Refreshes the specified entity with the latest data from the content database according to the specified mode.
Public method Refresh(RefreshMode, []) Refreshes an array of entities with the latest data from the content database according to the specified mode.
Public method RegisterList<T>(String, String) Enables continued reading and writing to an EntityList<TEntity> even after it has been renamed.
Public method RegisterList<T>(String, String, String) Enables continued reading and writing to an EntityList<TEntity> even after it has been moved to another Web site.
Public method SubmitChanges() Persists to the content database changes made by the current user to one or more lists; or, if a concurrency conflict is found, populates the ChangeConflicts property.
Public method SubmitChanges(ConflictMode) Persists to the content database changes made by the current user to one or more lists using the specified failure mode; or, if a concurrency conflict is found, populates the ChangeConflicts property.
Public method SubmitChanges(ConflictMode, Boolean) Persists, to the content database, changes made by the current user to one or more lists using the specified failure mode and the specified indication of whether the versions of changed list items should be incremented; or, if a concurrency conflict is found, populates the ChangeConflicts property.
Public method ToString (Inherited from Object.)

Top

See Also

Reference

DataContext Class

Microsoft.SharePoint.Linq Namespace