关于EF的函数问题

请问下图的函数格式怎么写,像Express<Func<Category,bool>>predicate的写法是(x=>x.ID>10),下图多了一个参数就不懂怎么写了,请大佬帮帮忙
关于EF的函数问题

回答:

public delegate TResult Func<in T1,in T2,out TResult>(T1 arg1, T2 arg2);

Type Parameters

T1

The type of the first parameter of the method that this delegate encapsulates.

This type parameter is contravariant. That is, you can use either the type you specified or any type that is less derived. For more information about covariance and contravariance, see Covariance and Contravariance in Generics.

T2

The type of the second parameter of the method that this delegate encapsulates.

This type parameter is contravariant. That is, you can use either the type you specified or any type that is less derived. For more information about covariance and contravariance, see Covariance and Contravariance in Generics.

TResult

The type of the return value of the method that this delegate encapsulates.

This type parameter is covariant. That is, you can use either the type you specified or any type that is more derived. For more information about covariance and contravariance, see Covariance and Contravariance in Generics.

 

SO:(t0,t1)=>true;

回答:

报错了,不识别x,请问这是什么情况
关于EF的函数问题

以上是 关于EF的函数问题 的全部内容, 来源链接: utcz.com/a/120482.html

回到顶部