Reputation: 79
What can I do so that EF becomes aware of the output
clause in SPs and generates the result object accordingly?
INSERT INTO goodtable
(token,
ip, long_ip,
) OUTPUT INSERTED.*
VALUES
(@token,
@ip, @long_ip,
);
What I currently do to circumvent this is writing a dummy select, generate the objects and the comment out the dummy select leaving the output. This is not a good solution for a long term run.
Please do not suggest changing the SQL.
Upvotes: 1
Views: 376
Reputation: 5550
Have you tried. when importing the stored procedure into EF, using function import, to add the returns a collection of
option.
I've never tried it, but can't see a reason for it not to work.
Upvotes: 1