-
Notifications
You must be signed in to change notification settings - Fork 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
Document new FromSql{Raw,Interpolated} methods #1673
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comments on several things that I believe need fixing. Also, you may want to consider fixing #665 (at least the part about ExecuteSqlCommand and its modern siblings) while you are are this. It should be low hanging fruit once the docs for FromSqlRaw and FromSqlIterpolated are complete.
02b375f
to
df55caa
Compare
Thanks for the reviews @divega and @smitpatel, I realized that my mental model of FromSql wasn't very accurate. Have rewritten the change, hopefully things are better now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. @roji, sorry it took me some time to come back to this PR.
@@ -7,19 +7,19 @@ uid: core/querying/raw-sql | |||
--- | |||
# Raw SQL Queries | |||
|
|||
Entity Framework Core allows you to drop down to raw SQL queries when working with a relational database. This can be useful if the query you want to perform can't be expressed using LINQ, or if using a LINQ query is resulting in inefficient SQL queries. Raw SQL queries can return entity types or, starting with EF Core 2.1, [query types](xref:core/modeling/query-types) that are part of your model. | |||
Entity Framework Core allows you to drop down to raw SQL queries when working with a relational database. This can be useful if the query you want to perform can't be expressed using LINQ, or if using a LINQ query is resulting in inefficient SQL queries. Raw SQL queries can be used to return any entities that are part of your model, including regular entities and [keyless entitties](xref:core/modeling/query-types). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
an inefficient SQL query.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
any entity types which are included in the model.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand entity as the instance and entitytype as the object's type.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand entity as the instance and entitytype as the object's type.
I also understand it this way, but I think it makes sense to specify the type here, as we're discussing the type of the type (regular vs. keyless). A bit like how we say that a C# method return value or reference types (and not necessarily value or reference values).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also renamed page here.
Have taken comments into account and merged. There's definitely still stuff to be improved here, we can always do it later. |
Closes #1667