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

Finish What's New in EF7 #4076

Merged
merged 8 commits into from
Oct 11, 2022
2 changes: 1 addition & 1 deletion entity-framework/core/querying/sql-queries.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ The following example passes a single parameter to a stored procedure by includi

[!code-csharp[Main](../../../samples/core/Querying/SqlQueries/Program.cs#FromSqlStoredProcedureParameter)]

While this syntax may look like regular C# [string interpolation](https://learn.microsoft.com/dotnet/csharp/language-reference/tokens/interpolated), the supplied value is wrapped in a `DbParameter` and the generated parameter name inserted where the `{0}` placeholder was specified. This makes > The <xref:Microsoft.EntityFrameworkCore.RelationalQueryableExtensions.FromSql%2A> safe from SQL injection attacks, and sends the value efficiently and correctly to the database.
While this syntax may look like regular C# [string interpolation](/dotnet/csharp/language-reference/tokens/interpolated), the supplied value is wrapped in a `DbParameter` and the generated parameter name inserted where the `{0}` placeholder was specified. This makes > The <xref:Microsoft.EntityFrameworkCore.RelationalQueryableExtensions.FromSql%2A> safe from SQL injection attacks, and sends the value efficiently and correctly to the database.

When executing stored procedures, it can be useful to use named parameters in the SQL query string, especially when the stored procedure has optional parameters:

Expand Down
Loading