views:

325

answers:

0

So I am trying to get the following query to work using SubSonic3 ActiveRecord with a Sql Server 2008 backend

facilities = new Select().From<Facility>()
             .ExecuteTypedList<Facility>();

as well as the following

facilities = new Select().From<Facility>()
                .InnerJoin<mem_Users_Facility>().InnerJoin<mem_User>().Where(mem_UsersTable.UserNameColumn).IsEqualTo(System.Web.HttpContext.Current.User)
                .ExecuteTypedList<Facility>();

The Table name is dbo.Facility but SubSonic keeps generating the SQL as Facilities. The class was generated by SubSonic so it knows what the table name is but it looks like the sql is getting generated as if the class is used in the Simple Repository(based off of a POCO). I know that I can use the Linq query syntax but I am more familiar with the old syntax and want to be able to use both. How can I write the two simple queries with Subsonic3