Reputation: 2610
I have a stored procedure which contains some if statements, with the different conditions, the result is different. The problems is, how can I retrieve the result by Linq to SQL? I don't know the type of the result, because it based on the condition. Who can help? Thx in advance!
Upvotes: 0
Views: 100
Reputation: 2610
I found a workaround myself.
I could map all the types in LINQ to SQL using ResultTypes attribute, and modify the return type from IExecuteResult to IMultipleResult.
But there may be some solution that doesn't force me to map all the types. I may be able to use reflection or something else. I'm not sure.
Upvotes: 1