-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Relational: Provide query execution escape hatch APIs that operates a the whole query level #14525
Comments
Consider also the case where the shape of the query is pre-determined and hence will not match what EF is expecting, as described in #16863. (We may choose not to support this.) |
@ajcvickers Thanks for choosing to add #16863 to this related issue. I hope the team will consider this as many of the .NET developers are dealing with Stored Procedures of SQL Server almost always. This is much needed for those who work with SQL script or Stored Procedure in EF Core. |
The SQL you pass to the
FromSql*()
(e.g. FromSqlRaw) method is used as a substitute for whatever the query root represented by the current IQueryable is mapped to in the database. As a consequence:FromSql()
is called on a query that doesn't have a single query root (e.g. because multiple query roots have been combined in a join), we throw at runtimeInclude()
is called on a query withFromSql()
, we expect the SQL to only supply columns for the query root, so we still need to turn the user provided SQL into a subquery and generate additional JOINsThis issue is about providing alternative APIs that allow supplying a substitute SQL statement (or store procedure call) or
DbDataReader
for the whole query. The user provided SQL or DbDataReader will be assumed to contain all the necessary columns used by the materializer, regardless of whetherInclude()
or implicit eager loading (e.g. aggregates), or multiple query roots are present.The text was updated successfully, but these errors were encountered: