DataContext.Log property

Gets or sets an object that will write the Collaborative Application Markup Language (CAML) query that results from the translation of the LINQ query.

Namespace:  Microsoft.SharePoint.Linq
Assembly:  Microsoft.SharePoint.Linq (in Microsoft.SharePoint.Linq.dll)


Public Property Log As TextWriter
Dim instance As DataContext
Dim value As TextWriter

value = instance.Log

instance.Log = value
public TextWriter Log { get; set; }

Property value

Type: System.IO.TextWriter
A TextWriter that can be called to write the CAML query.


The following example shows how to set the Log property to write the CAML queries to the console in a console application:

DataContext dc = new DataContext("http://localhost");
dc.Log = Console.Out;
Dim dc As New DataContext("http://localhost")
dc.Log = Console.Out

See also


DataContext class

DataContext members

Microsoft.SharePoint.Linq namespace