Skip to content

Commit

Permalink
Consolidate SQL syntax (#24806)
Browse files Browse the repository at this point in the history
  • Loading branch information
lauxjpn authored May 4, 2021
1 parent acc4ae0 commit 23343b1
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1322,7 +1322,7 @@ public virtual async Task FromSqlRaw_in_subquery_with_dbParameter(bool async)
o =>
context.Customers
.FromSqlRaw(
@"SELECT * FROM ""Customers"" WHERE ""City"" = @city",
NormalizeDelimitersInRawString(@"SELECT * FROM [Customers] WHERE [City] = @city"),
// ReSharper disable once FormatStringProblem
CreateDbParameter("@city", "London"))
.Select(c => c.CustomerID)
Expand All @@ -1344,7 +1344,7 @@ public virtual async Task FromSqlRaw_in_subquery_with_positional_dbParameter_wit
o =>
context.Customers
.FromSqlRaw(
@"SELECT * FROM ""Customers"" WHERE ""City"" = {0}",
NormalizeDelimitersInRawString(@"SELECT * FROM [Customers] WHERE [City] = {0}"),
// ReSharper disable once FormatStringProblem
CreateDbParameter(null, "London"))
.Select(c => c.CustomerID)
Expand All @@ -1366,7 +1366,7 @@ public virtual async Task FromSqlRaw_in_subquery_with_positional_dbParameter_wit
o =>
context.Customers
.FromSqlRaw(
@"SELECT * FROM ""Customers"" WHERE ""City"" = {0}",
NormalizeDelimitersInRawString(@"SELECT * FROM [Customers] WHERE [City] = {0}"),
// ReSharper disable once FormatStringProblem
CreateDbParameter("@city", "London"))
.Select(c => c.CustomerID)
Expand All @@ -1391,7 +1391,7 @@ public virtual async Task FromSqlRaw_with_dbParameter_mixed_in_subquery(bool asy
o =>
context.Customers
.FromSqlRaw(
@"SELECT * FROM ""Customers"" WHERE ""City"" = {0} AND ""ContactTitle"" = @title",
NormalizeDelimitersInRawString(@"SELECT * FROM [Customers] WHERE [City] = {0} AND [ContactTitle] = @title"),
city,
// ReSharper disable once FormatStringProblem
CreateDbParameter("@title", title))
Expand All @@ -1408,7 +1408,7 @@ public virtual async Task FromSqlRaw_with_dbParameter_mixed_in_subquery(bool asy
o =>
context.Customers
.FromSqlRaw(
@"SELECT * FROM ""Customers"" WHERE ""City"" = @city AND ""ContactTitle"" = {1}",
NormalizeDelimitersInRawString(@"SELECT * FROM [Customers] WHERE [City] = @city AND [ContactTitle] = {1}"),
// ReSharper disable once FormatStringProblem
CreateDbParameter("@city", city),
title)
Expand Down

0 comments on commit 23343b1

Please sign in to comment.