开发者

NHibernate Queries with Values Produced by Business Logic

I have an NH query which returns a Product with a BasePrice. Depending on various other factors, such as Manufacturer price markup, I use a PricingService on the C# side of things to produce a "final" price.

The issue is that I now need to query against this final value - i.e., I need to run a query that selects Products within a particular "final" price range, but because that value only exists on the C# side, I can't do an NH query against it.

I'开发者_StackOverflow中文版m thinking that my approach to this is all wrong, but I really didn't want to put the logic of the final price calculation in a SQL function or something like that, so any suggestions would be appreciated.


You can do your calculations in HQL or Linq (with the new provider in 3.x; the 2.x one is a little limited).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜