Entity Framework Extensions PostConfiguration

Description

The PostConfiguration event is raised just before a bulk method is called, such as, BulkInsert, BulkUpdate, BulkDelete, BulkMerge, BulkSynchronize etc.

Example

The following example sets the Log property in the PostConfiguration event.

using (var context = new EntityContext())
{
    context.BulkInsert(list, options =>
    {
        options.PostConfiguration = operations =>
        {
            operations.Log = Console.WriteLine;       
        };
    });
}

Try it in EF Core | Try it in EF6

In the PostConfiguration event, the Log property is set and to log the database commands and queries performed in that BulkInsert method.


Last updated: 2023-03-01
Author:


Contents