1
只是两个快速问题Linq表达式转换
1.下面的语句叫什么?
Func<usersDto, bool> predicate
2.与下面有什么不同?
Expression<Func<usersDto, bool>>
3.How做我转换Func<type1,bool>
到Func<type2,bool>
。好像先进的东西我
例
GetUsers(Func<UserDto,bool> predicate)
{
return EfContext.Users.Where (convert above predicate to be passed here)
.Cast<>();
}
问题可能已被回答。 [http://stackoverflow.com/questions/793571/why-would-you-use-expressionfunct-rather-than-funct][1] [1]:HTTP:// stackoverflow.com/questions/793571/why-would-you-use-expressionfunct-rather-than-funct – mdcuesta
第一个被称为谓词。第二个没有名字,但我会称之为Al。 – SWeko
@mdcuesta#2从您的链接回答,#1和#3仍然打开 – Deeptechtons