tags:

views:

153

answers:

2

trying to instantiate a Query in SubSonic using the below method (as it apparently does not require a trip to the DB like the other methods for constructing a Query object do), per Scott Kohl's excellent SubSonic documentation. Problem is, the generated code defines this method as private - not public. Is there a better way to do this? Was the change made recently from public to private? Why?

Thanks.

SubSonic.Query query1 = new SubSonic.Query(TradeBender.Item.GetTableSchema());
+1  A: 

SubSonic.Query is kinda outdated. Check out the SQLQuery class. Here's example code:

    Dim q As SubSonic.SqlQuery() = New SubSonic.Select().From("Table").Where("Field").IsEqualTo(1)

    ' Or

    Dim BookList As Generic.List(Of NorthWind.Data.Book) = New SubSonic.Select(). _
        From(NorthWind.Data.Tables.Book).Where("Field"). _
        IsEqualTo(1).ExecuteTypedList(Of NorthWind.Data.Book)()
Rick Ratayczak
Thanks Rick. Can I ask: What is a good resource to use that contains the latest documentation for subsonic? I am havign a hell of a time finding good documentation/Code samples that are current. Also, is your code above from 2.2 or 3?
TheUXGuy
2.1 or 2.2 I don't mess with 3 yet (or at least not much).http://subsonicproject.com/querying/select-queries/
Rick Ratayczak
+3  A: 

You can also try the new wiki that I'm trying to get built. It's not released fully yet - but getting there:

http://subsonicproject.com/docs

Rob Conery