tags:

views:

255

answers:

1

I have a query that performs a UNION between two tables. I'm trying to implement the same thing with SubSonic. I have two related questions:

  • What is the SubSonic syntax to perform a union.
  • How do I rename a column. Assuming the UNION will require to match the column names between the two tables
+5  A: 

There isn't a UNION syntax in SubSonic. You could achieve something similar via the method shown here: http://forums.subsonicproject.com/forums/t/3684.aspx

What best solution I've found is to implement the UNION inside a view and then get SubSonic to generate a model for that view instead.

Adam