Parsing criteria in NHibernate

走远了吗. 提交于 2020-01-25 12:57:05

问题


Is it possible to parse criteria from string?


回答1:


You're not giving anyone much to go on, so I'll just have to take a guess at what you're trying to ask...

If you're looking for a simple criteria.Parse("string here"); then no, I don't such a thing exists.

However, the criteria interface lends itself very well to dynamic creation (in fact, that's its intended purpose). As such, yes, you could write a string parser to create ICriteria elements from tokens.

Perhaps if you provide more information on the problem you are trying to solve someone can respond with a better answer.



来源:https://stackoverflow.com/questions/930131/parsing-criteria-in-nhibernate

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!