语言

DbContext.SavingChanges 活动

定义

在调用或调用 SaveChanges 开始时触发的事件 SaveChangesAsync

[System.Runtime.CompilerServices.Nullable(new System.Byte[] { 2, 1 })]
public event EventHandler<Microsoft.EntityFrameworkCore.SavingChangesEventArgs>? SavingChanges;
public event EventHandler<Microsoft.EntityFrameworkCore.SavingChangesEventArgs> SavingChanges;
public event EventHandler<Microsoft.EntityFrameworkCore.SavingChangesEventArgs>? SavingChanges;
[<System.Runtime.CompilerServices.Nullable(new System.Byte[] { 2, 1 })>]
member this.SavingChanges : EventHandler<Microsoft.EntityFrameworkCore.SavingChangesEventArgs> 
member this.SavingChanges : EventHandler<Microsoft.EntityFrameworkCore.SavingChangesEventArgs> 
Public Event SavingChanges As EventHandler(Of SavingChangesEventArgs) 

事件类型

特性

注解

有关详细信息和示例,请参阅在 EF Core 和 EF Core 事件中保存数据。

适用于