Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Database.Log Property DefinitionImportant
Some information relates to prerelease product that may be substantially modified before itâs released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Set this property to log the SQL generated by the DbContext to the given delegate. For example, to log to the console, set this property to Write(String).
public Action<string> Log { get; set; }
member this.Log : Action<string> with get, set
Public Property Log As Action(Of String)
Property Value Action
<
String>
RemarksThe format of the log text can be changed by creating a new formatter that derives from DatabaseLogFormatter and setting it with SetDatabaseLogFormatter(Func<DbContext,Action<String>,DatabaseLogFormatter>). For more low-level control over logging/interception see IDbCommandInterceptor and DbInterception.
Applies toCollaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.Entity Framework
Open a documentation issue Provide product feedback FeedbackWas this page helpful?
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4