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

Allow configuring sproc mapping to use parameter names for invocation #28439

Open
Tracked by #22959 ...
AndriySvyryd opened this issue Jul 13, 2022 · 6 comments
Open
Tracked by #22959 ...

Comments

@AndriySvyryd
Copy link
Member

This can be used avoid parameter ordering issues and avoid sending default values when there are many optional parameters

Split off from #245

@roji
Copy link
Member

roji commented Aug 3, 2022

If we don't do this for 7.0, we may want to remove the HasName API on the parameter builders.

@AndriySvyryd
Copy link
Member Author

If we don't do this for 7.0, we may want to remove the HasName API on the parameter builders.

Since the values are effectively unused we can change them in the future without it being a breaking change.

@roji
Copy link
Member

roji commented Aug 3, 2022

Sure, but wouldn't users find it confusing to have this unused configuration, any reason not to remove it until we make use of it?

No strong feelings though if you want to keep it.

@AndriySvyryd
Copy link
Member Author

At this stage it's more work to remove it

@dekenless
Copy link

To clarify, in EF 7 the calling of stored procedures for CUD operations will only be positional? I think it is important to be able to define the mapping between column name and parameter name. This ability is helpful in ensuring breaking changes are not introduced into ones code base and to ensure there is not an inadvertent parameter to column mismatch. Moreover, those organizations with large EDMX models want the ability to automate the conversion to EF Core (i.e. the EDMX does have the mapping and a T4 transformation allows for the definition of the entity to stored procedure mapping)

@roji
Copy link
Member

roji commented Oct 3, 2022

@dekenless that's right - EF7 will only support positional parameters in CUD sproc mapping; one reason for this is that while all databases support positional parameters, not all support named (see here for more info). This issue tracks adding named parameters in the future.

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

No branches or pull requests

4 participants