How can I reproduce
SELECT CAST(ID AS varchar(20)) AS IdAsString FROM Table
Using Subsonic 2.2?
Once you've generated classes from the database, something like this:
TableCollection tc = new TableCollection (); TableCollection.Load(); string s = ""; foreach (Table t in tc) { s += " " + t.ID.ToString(); }
I'm assuming you want the whole table, otherwise you'd probably have the ID to start with. You can also use
TableCollection.WHERE("OtherColumn", 23).Load();
to retrict the table records returned.
DAL.DB.Select( string.Format("CAST({0} AS varchar(20)) AS IdAsString", DAL.Table.Columns.ID) ) .From<DAL.Table>() ...
Once you've generated classes from the database, something like this:
I'm assuming you want the whole table, otherwise you'd probably have the ID to start with. You can also use
to retrict the table records returned.