Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stored proc with multiple returns #830

Open
lipanna opened this issue Jan 26, 2024 · 3 comments
Open

Stored proc with multiple returns #830

lipanna opened this issue Jan 26, 2024 · 3 comments

Comments

@lipanna
Copy link

lipanna commented Jan 26, 2024

I'm calling SP that has 5 of these conditions:

If (condition)
select a, b, c...
RETURN 0;

If (condition)
select a, b, c...
RETURN 0;

SP always returns only one resultset. Each select has exactly the same columns. However, generated POCO contains 5 resultsets and I get an error message that EF doesn't support multiple resultsets.
Is there a way around it? EF Core 6.
Thanks.

@sjh37
Copy link
Owner

sjh37 commented Jan 27, 2024

@lipanna in your connection string add ;MultipleActiveResultSets=True

@lipanna
Copy link
Author

lipanna commented Jan 29, 2024

Hi Simon,
It is there by default, but doesn't seem to work...

Settings.ConnectionString = "Data Source=xxx;Initial Catalog=xxx;Integrated Security=True;MultipleActiveResultSets=True;Encrypt=false;TrustServerCertificate=true";

@NeilN1
Copy link

NeilN1 commented Jul 20, 2024

Piggy-backing on this - there's been no "magic" added to the latest versions of EF Reverse POCO to make up for the lack of EF Core's support for returning multiple result sets or table variables, right? We have to roll our own solution?

// public async Task UspMemberStatusReportGetAsync() Cannot be created as EF Core does not yet support stored procedures with multiple result sets.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants