SubSonic.Query VS SubSonic.SqlQuery [英] SubSonic.Query vs SubSonic.SqlQuery
问题描述
我一直在使用SubSonic.Query所有这些的同时,直到有一天,当我不能这样做IS NULL,加入在哪里,后来我意识到,SubSonic.SqlQuery存在,它有ISNULL的函数() 。检查出的源$ C $ C之后,查询和使用SqlQuery以任何方式不被继承,有什么是他们的主要区别,以及如何决定使用哪一个?
编辑:我刚刚意识到,我可以真正做到IS NULL通过使用Comparison.Is。这让我更加迷惑既使用SqlQuery和查询几乎可以做同样的事情
解决方案SqlQuery类中添加了2.1版本
I've been using SubSonic.Query all these while, until one day when I can't do "IS NULL" by adding WHERE, then I realized that SubSonic.SqlQuery existed and it has a function of "IsNull()". After checking out the source code, Query and SqlQuery is not inherited in any way, so what's their major difference and how to decide which to use?
Edit: I just realized that I could actually do "IS NULL" by using "Comparison.Is". That makes me even more confuse as both SqlQuery and Query can almost do the same thing
SqlQuery was added in version 2.1. It's vastly superior to Query as it supports is null and joins in particular. Here's a post that covers it (it was called Query2 at the time) or see my 3-part series on how I use SubSonic.
这篇关于SubSonic.Query VS SubSonic.SqlQuery的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!