Guys, how can I do a select statement in subsonic like this:
select OneTable.ID as [ID One], OneTable.Name as [Name One], TwoTable.ID as [ID Two], TwoTable.Name as [Name Two]
from OneTable
inner join TwoTable on
OneTable.ID = TwoTable.OneTableID
I tried this:
using (IDataReader rdr = DB.Select("OneTable.ID [ID One], OneTable.Name [Name One], TwoTable.ID [ID Two], TwoTable.Name [Name Two]")
.From(OneTable.Schema.TableName)
.InnerJoin(OneTable.Schema.TableName, OneTable.Columns.ID, TwoTable.Schema.TableName, TwoTable.Columns.OneTableID)
I'm having trouble with the "as" in the select