Share via


EntityFrameworkQueryableExtensions.TagWith<T> 方法

定义

将标记添加到与 EF LINQ 查询关联的标记集合。 标记是可在查询管道的不同点提供上下文跟踪信息的查询注释。

public static System.Linq.IQueryable<T> TagWith<T> (this System.Linq.IQueryable<T> source, string tag);
static member TagWith : System.Linq.IQueryable<'T> * string -> System.Linq.IQueryable<'T>
<Extension()>
Public Function TagWith(Of T) (source As IQueryable(Of T), tag As String) As IQueryable(Of T)

类型参数

T

正在查询的实体的类型。

参数

source
IQueryable<T>

源查询。

tag
String

标记。

返回

使用给定标记批注的新查询。

例外

sourcetagnull

tag 为空或空格。

注解

有关详细信息和示例,请参阅 在 EF Core 中标记查询

适用于