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

faulty
  • 8,117
  • 12
  • 44
  • 61

2 Answers2

4

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.

John Sheehan
  • 77,456
  • 30
  • 160
  • 194
0

I am not sure what DB you are targeting but the IsNull Method did not work correctly for the Oracle Provider. I had to fix change a couple lines to get it to work on my machine.