SubSonic.Query VS SubSonic.SqlQuery [英] SubSonic.Query vs SubSonic.SqlQuery

查看:247
本文介绍了SubSonic.Query VS SubSonic.SqlQuery的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在使用SubSonic.Query所有这些的同时,直到有一天,当我不能这样做IS NULL,加入在哪里,后来我意识到,SubSonic.SqlQuery存在,它有ISNULL的函数() 。检查出的源$ C ​​$ C之后,查询和使用SqlQuery以任何方式不被继承,有什么是他们的主要区别,以及如何决定使用哪一个?

编辑:我刚刚意识到,我可以真正做到IS NULL通过使用Comparison.Is。这让我更加迷惑既使用SqlQuery和查询几乎可以做同样的事情

解决方案

SqlQuery类中添加了2.1版本

。这是大大优于查询,因为它支持为空,并加入特别。这里有一个<一个href="http://subsonicproject.com/2-1-pakala/subsonic-version-2-1-pakala-$p$pview-the-new-query-tool/"相对=nofollow>贴子,讨论它(它被称为Query2的时候),或者看我的 3部系列我如何使用亚音速

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屋!

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