Hi,
I have an app and I have come to a point where I need to build a sql statement up dynamically.
Is there a way to execute it and return a type that has not been defined via the designer with Linq2Sql??
Malcolm
Hi,
I have an app and I have come to a point where I need to build a sql statement up dynamically.
Is there a way to execute it and return a type that has not been defined via the designer with Linq2Sql??
Malcolm
Do you mean an existing Type you yourself defined? That is not possible, you always have to map LINQ2SQL objects to your own object logic (schema objects).
In .NET4 you will have more options for controlling the output type, but only with LINQ2Entities. LINQ2SQL will remain as it is now.
Nope.
You can dynamically create a SQL Query and execute it but it MUST map to a type in the datacontext.
I usually end up creating a view and adding it to the datacontext or using the good old SQLClient library.
c'est la vie