简体   繁体   English

在NH 3中扩展包含LINQ方法

[英]Extending contains LINQ method in NH 3

I have a problem with the integration of NH3 to my project I need to extend the LINQ provider for contains method. 我将NH3集成到我的项目中时遇到问题,我需要扩展LINQ提供程序以包含方法。 As a start point, i have followed this tutorial http://fabiomaulo.blogspot.com/2010/07/nhibernate-linq-provider-exten ... and succeed in the creation of the IsLike method. 作为起点,我遵循了本教程http://fabiomaulo.blogspot.com/2010/07/nhibernate-linq-provider-exten ...并成功创建了IsLike方法。

My second step was to overload the contains method with a code like the IsLike. 我的第二步是用IsLike这样的代码重载contains方法。 But this don't work ! 但这行不通!

I get an error specifying that a current key already exists. 我收到一条错误消息,指出当前密钥已经存在。

Is there anything special to do to overload contains ? 有什么特别的方法可以使包含的内容过载?

Thank's by advance. 提前谢谢。

Some forms of Contains are already supported (String.Contains, for example). 已经支持某些形式的Contains (例如,String.Contains)。 You are probably clashing with that one. 您可能正在与那个冲突。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM