- Main Features
-
Bulk Options
- Bulk Options
- Audit
- Batch
-
Column
- Column Input Expression
- Column Output Expression
- Column InputOutput Expression
- Column PrimaryKey Expression
- Column Synchronize DeleteKey Subset Expression
- Ignore OnInsert Expression
- Ignore OnMergeInsert Expression
- Ignore OnMergeMatched AndCondition Expression
- Ignore OnMergeMatched AndOneNotCondition Expression
- Ignore OnMergeUpdate Expression
- Ignore OnSynchronizeInsert Expression
- Ignore OnSynchronizeMatched AndCondition Expression
- Ignore OnSynchronizeMatched AndOneNotCondition Expression
- Ignore OnSynchronizeUpdate Expression
- Ignore OnUpdate Expression
- Ignore OnUpdateMatched AndCondition Expression
- Ignore OnUpdateMatched AndOneNotCondition Expression
- MergeMatched AndCondition Expression
- MergeMatched AndNotCondition Expression
- SynchronizeMatched AndCondition Expression
- SynchronizeMatched AndOneNotCondition Expression
- UpdateMatched AndCondition Expression
- UpdateMatched AndOneNotCondition Expression
- Coalesce Destination OnMergeUpdate Expression
- Coalesce Destination OnUpdate Expression
- Coalesce OnMergeUpdate Expression
- Coalesce OnUpdate Expression
- Context Factory
- Execute Event
- ExplicitValueResolutionMode
- Identity
- Include Graph
- ForceValueGeneratedStrategy
- Key
- Logging
- Rows Affected
- Temporary Table
- Transaction
- Transient Error
- SQL Server
- Coalesce
- Coalesce Destination
- Delete Matched and Condition
- Delete Matched and one NOT Condition
- Delete Matched and Formula
- Matched and Condition
- Matched and one NOT Condition
- Matched and Formula
- Batch Operations
- Events
- Utilities
- C# Eval Expression
- Articles
- Troubleshooting
- Release Notes
Entity Framework Extensions Logging
Description
The Entity Framework Extensions Logging
feature let you log all messages of type "Information".
Key Features
- Allow to see SQL that are executed
- Allow to see parameter & time...
Getting Started
There is 2 ways to use the logging features
Logging with an action
To use the Logging
feature with an action, you need to define a delegate to execute.
// Execute var sb = new StringBuilder(); context.BulkMerge(list, options => { options.Log = s => sb.AppendLine(s); }); // Result Console.WriteLine(sb.ToString());
Logging with the LogDump
To use the Logging
feature with the LogDump, you need to use the UseBulkOptions
method to set:
UseLogDump = true
: To enable theLogDump
.LogDump = sb
: To specify theStringBuilder
to use to dump all messages.
// Execute var sb = new StringBuilder(); context.BulkMerge(list, options => { options.UseLogDump = true; options.LogDump = sb; }); // Result Console.WriteLine(sb.ToString());
Scenarios
- Log into a Database
- Log into a File
- Log into NLog
Options
Name | Description |
---|---|
Log | The Log property is an action executed when a message of type "Information" happens. |
UseLogDump | When the UseLogDump property is true , the LogDump property stores all messages of type "Information". |
LogDump | The LogDump property stores all messages of type "Information". This option requires to set the UseLogDump property to true . |
Author: ZZZ Projects