Skip to content

Commit

Permalink
Correctly FromSqlRaw docs
Browse files Browse the repository at this point in the history
Fixes #25567
  • Loading branch information
roji committed Aug 18, 2021
1 parent c35b1b2 commit d65ef35
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public static DbCommand CreateDbCommand(this IQueryable source)
/// <para>
/// As with any API that accepts SQL it is important to parameterize any user input to protect against a SQL injection
/// attack. You can include parameter place holders in the SQL query string and then supply parameter values as additional
/// arguments. Any parameter values you supply will automatically be converted to a DbParameter:
/// arguments. Any parameter values you supply will automatically be converted to a <see cref="DbParameter" />:
/// </para>
/// <code>context.Blogs.FromSqlRaw("SELECT * FROM [dbo].[SearchBlogs]({0})", userSuppliedSearchTerm)</code>
/// <para>
Expand All @@ -76,10 +76,10 @@ public static DbCommand CreateDbCommand(this IQueryable source)
/// consider using <see cref="FromSqlInterpolated{TEntity}" /> to create parameters.
/// </para>
/// <para>
/// This overload also accepts DbParameter instances as parameter values. This allows you to use named
/// parameters in the SQL query string:
/// This overload also accepts <see cref="DbParameter" /> instances as parameter values. In addition to using positional
/// placeholders as above (<c>{0}</c>), this allows you to use named placeholders directly in the SQL query string:
/// </para>
/// <code>context.Blogs.FromSqlRaw("SELECT * FROM [dbo].[SearchBlogs]({@searchTerm})", new SqlParameter("@searchTerm", userSuppliedSearchTerm))</code>
/// <code>context.Blogs.FromSqlRaw("SELECT * FROM [dbo].[SearchBlogs](@searchTerm)", new SqlParameter("@searchTerm", userSuppliedSearchTerm))</code>
/// </summary>
/// <typeparam name="TEntity"> The type of the elements of <paramref name="source" />. </typeparam>
/// <param name="source">
Expand Down Expand Up @@ -119,7 +119,7 @@ public static IQueryable<TEntity> FromSqlRaw<TEntity>(
/// <para>
/// As with any API that accepts SQL it is important to parameterize any user input to protect against a SQL injection
/// attack. You can include interpolated parameter place holders in the SQL query string. Any interpolated parameter values
/// you supply will automatically be converted to a DbParameter:
/// you supply will automatically be converted to a <see cref="DbParameter" />:
/// </para>
/// <code>context.Blogs.FromSqlInterpolated($"SELECT * FROM [dbo].[SearchBlogs]({userSuppliedSearchTerm})")</code>
/// </summary>
Expand Down

0 comments on commit d65ef35

Please sign in to comment.