Customers_Filter方法中的Lambda表达式 [英] Lambda Expression in Customers_Filter method

查看:88
本文介绍了Customers_Filter方法中的Lambda表达式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个相当复杂的业务场景,必须根据明确的业务规则将客户过滤到用户.

I have a rather complicated business scenario where I have to filter the Customers to the users according to intrincated business rules.

我已经定义了一个函数,该函数将获取一个Customer Entity,并返回一个布尔值作为结果,然后尝试将它在Customer_Filter方法中用作lambda表达式.

I have defined a Function that gets one Customer Entity and returns a Boolean value as a result and then tried to use it in the Customers_Filter method as a lambda expression.

但是该功能被完全忽略了.

But the Function is totally ignored.

问题:

1.可以在Customers_Filter方法内调用用户定义的函数吗?

1. Is possible to call user defined functions inside the Customers_Filter method?

2.我该如何实现这种功能?

2. How must I implement this kind of function?

Jean Pierre Chauny

Jean Pierre Chauny

推荐答案

这应该是可能的.您能否提供更多详细信息?可能显示您尝试使用filter方法的内容?

This should be possible.  Can you provide more details?  Possibly show what you attempted in the filter method?


这篇关于Customers_Filter方法中的Lambda表达式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆