Tutorial :GetTableSchema() inaccessible due to its protection level



Question:

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());  


Solution:1

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)()  


Solution:2

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


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »