DbContext.IDbContextPoolable.SetLeaseAsync 方法

定义

这是一个支持 Entity Framework Core 基础结构的内部 API,不受与公共 API 相同的兼容性标准的约束。 可能会在任何版本中更改或删除它,而无需通知。 仅应在代码中非常谨慎地直接使用它,并且知道在更新到新的 Entity Framework Core 版本时这样做可能会导致应用程序失败。

[Microsoft.EntityFrameworkCore.Infrastructure.EntityFrameworkInternal]
System.Threading.Tasks.Task IDbContextPoolable.SetLeaseAsync (Microsoft.EntityFrameworkCore.Internal.DbContextLease lease, System.Threading.CancellationToken cancellationToken);
[<Microsoft.EntityFrameworkCore.Infrastructure.EntityFrameworkInternal>]
abstract member Microsoft.EntityFrameworkCore.Internal.IDbContextPoolable.SetLeaseAsync : Microsoft.EntityFrameworkCore.Internal.DbContextLease * System.Threading.CancellationToken -> System.Threading.Tasks.Task
override this.Microsoft.EntityFrameworkCore.Internal.IDbContextPoolable.SetLeaseAsync : Microsoft.EntityFrameworkCore.Internal.DbContextLease * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Function SetLeaseAsync (lease As DbContextLease, cancellationToken As CancellationToken) As Task Implements IDbContextPoolable.SetLeaseAsync

参数

lease
Microsoft.EntityFrameworkCore.Internal.DbContextLease
cancellationToken
CancellationToken

返回

实现

Microsoft.EntityFrameworkCore.Internal.IDbContextPoolable.SetLeaseAsync(Microsoft.EntityFrameworkCore.Internal.DbContextLease,System.Threading.CancellationToken)
属性

适用于