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

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

问题描述

我一直在使用SubSonic.Query所有这些,直到有一天,当我不能通过添加WHEREIS NULL,然后我意识到SubSonic.SqlQuery存在,它有一个函数IsNull() 。检查源代码后,Query和SqlQuery不会以任何方式继承,因此它们的主要区别是什么,以及如何决定使用哪个?

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?

编辑:我刚刚实现我可以通过使用Comparison.Is实际上做IS NULL。这使得我更加困惑,因为SqlQuery和Query几乎可以做同样的事情

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在版本2.1中添加。它远远优于查询,因为它支持null和特别是连接。以下是帖子覆盖它(当时称为Query2)或查看我的 3-部分系列关于我如何使用SubSonic

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天全站免登陆