Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ protected override Expression VisitCollate(CollateExpression collateExpression)
/// </summary>
protected override Expression VisitDelete(DeleteExpression deleteExpression)
{
Sql.Append("SET NOCOUNT OFF").AppendLine(Dependencies.SqlGenerationHelper.StatementTerminator);

Comment on lines 81 to +84
var selectExpression = deleteExpression.SelectExpression;

if (selectExpression is
Expand Down Expand Up @@ -281,6 +283,8 @@ protected override Expression VisitTableValuedFunction(TableValuedFunctionExpres
/// </summary>
protected override Expression VisitUpdate(UpdateExpression updateExpression)
{
Sql.Append("SET NOCOUNT OFF").AppendLine(Dependencies.SqlGenerationHelper.StatementTerminator);

Comment on lines 284 to +287
var selectExpression = updateExpression.SelectExpression;

if (selectExpression is
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public override async Task Delete_where_hierarchy_derived(bool async)

AssertSql(
"""
SET NOCOUNT OFF;
DELETE FROM [k]
FROM [Kiwi] AS [k]
WHERE [k].[CountryId] = 1 AND [k].[Name] = N'Great spotted kiwi'
Expand All @@ -39,6 +40,7 @@ public override async Task Delete_where_using_hierarchy(bool async)

AssertSql(
"""
SET NOCOUNT OFF;
DELETE FROM [c]
FROM [Countries] AS [c]
WHERE (
Expand All @@ -60,6 +62,7 @@ public override async Task Delete_where_using_hierarchy_derived(bool async)

AssertSql(
"""
SET NOCOUNT OFF;
DELETE FROM [c]
FROM [Countries] AS [c]
WHERE (
Expand Down Expand Up @@ -136,6 +139,7 @@ public override async Task Update_base_property_on_derived_type(bool async)
"""
@p='SomeOtherKiwi' (Size = 4000)

SET NOCOUNT OFF;
UPDATE [k]
SET [k].[Name] = @p
FROM [Kiwi] AS [k]
Expand All @@ -151,6 +155,7 @@ public override async Task Update_derived_property_on_derived_type(bool async)
"""
@p='0' (Size = 1)

SET NOCOUNT OFF;
UPDATE [k]
SET [k].[FoundOn] = @p
FROM [Kiwi] AS [k]
Expand All @@ -166,6 +171,7 @@ public override async Task Update_where_using_hierarchy(bool async)
"""
@p='Monovia' (Size = 4000)

SET NOCOUNT OFF;
UPDATE [c]
SET [c].[Name] = @p
FROM [Countries] AS [c]
Expand All @@ -191,6 +197,7 @@ public override async Task Update_base_and_derived_types(bool async)
@p='Kiwi' (Size = 4000)
@p1='0' (Size = 1)

SET NOCOUNT OFF;
UPDATE [k]
SET [k].[Name] = @p,
[k].[FoundOn] = @p1
Expand All @@ -207,6 +214,7 @@ public override async Task Update_where_using_hierarchy_derived(bool async)
"""
@p='Monovia' (Size = 4000)

SET NOCOUNT OFF;
UPDATE [c]
SET [c].[Name] = @p
FROM [Countries] AS [c]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public override async Task Delete_where_hierarchy_derived(bool async)

AssertSql(
"""
SET NOCOUNT OFF;
DELETE FROM [k]
FROM [Kiwi] AS [k]
WHERE [k].[Name] = N'Great spotted kiwi'
Expand All @@ -39,6 +40,7 @@ public override async Task Delete_where_using_hierarchy(bool async)

AssertSql(
"""
SET NOCOUNT OFF;
DELETE FROM [c]
FROM [Countries] AS [c]
WHERE (
Expand All @@ -60,6 +62,7 @@ public override async Task Delete_where_using_hierarchy_derived(bool async)

AssertSql(
"""
SET NOCOUNT OFF;
DELETE FROM [c]
FROM [Countries] AS [c]
WHERE (
Expand Down Expand Up @@ -136,6 +139,7 @@ public override async Task Update_base_property_on_derived_type(bool async)
"""
@p='SomeOtherKiwi' (Size = 4000)

SET NOCOUNT OFF;
UPDATE [k]
SET [k].[Name] = @p
FROM [Kiwi] AS [k]
Expand All @@ -150,6 +154,7 @@ public override async Task Update_derived_property_on_derived_type(bool async)
"""
@p='0' (Size = 1)

SET NOCOUNT OFF;
UPDATE [k]
SET [k].[FoundOn] = @p
FROM [Kiwi] AS [k]
Expand All @@ -164,6 +169,7 @@ public override async Task Update_where_using_hierarchy(bool async)
"""
@p='Monovia' (Size = 4000)

SET NOCOUNT OFF;
UPDATE [c]
SET [c].[Name] = @p
FROM [Countries] AS [c]
Expand All @@ -189,6 +195,7 @@ public override async Task Update_base_and_derived_types(bool async)
@p='Kiwi' (Size = 4000)
@p1='0' (Size = 1)

SET NOCOUNT OFF;
UPDATE [k]
SET [k].[Name] = @p,
[k].[FoundOn] = @p1
Expand All @@ -204,6 +211,7 @@ public override async Task Update_where_using_hierarchy_derived(bool async)
"""
@p='Monovia' (Size = 4000)

SET NOCOUNT OFF;
UPDATE [c]
SET [c].[Name] = @p
FROM [Countries] AS [c]
Expand All @@ -225,6 +233,7 @@ public override async Task Update_with_interface_in_property_expression(bool asy
"""
@p='0'

SET NOCOUNT OFF;
UPDATE [c]
SET [c].[SugarGrams] = @p
FROM [Coke] AS [c]
Expand All @@ -239,6 +248,7 @@ public override async Task Update_with_interface_in_EF_Property_in_property_expr
"""
@p='0'

SET NOCOUNT OFF;
UPDATE [c]
SET [c].[SugarGrams] = @p
FROM [Coke] AS [c]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ public override async Task Delete_where_hierarchy(bool async)

AssertSql(
"""
SET NOCOUNT OFF;
DELETE FROM [a]
FROM [Animals] AS [a]
WHERE [a].[CountryId] = 1 AND [a].[Name] = N'Great spotted kiwi'
Expand All @@ -33,6 +34,7 @@ public override async Task Delete_where_hierarchy_derived(bool async)

AssertSql(
"""
SET NOCOUNT OFF;
DELETE FROM [a]
FROM [Animals] AS [a]
WHERE [a].[Discriminator] = N'Kiwi' AND [a].[CountryId] = 1 AND [a].[Name] = N'Great spotted kiwi'
Expand All @@ -45,6 +47,7 @@ public override async Task Delete_where_using_hierarchy(bool async)

AssertSql(
"""
SET NOCOUNT OFF;
DELETE FROM [c]
FROM [Countries] AS [c]
WHERE (
Expand All @@ -60,6 +63,7 @@ public override async Task Delete_where_using_hierarchy_derived(bool async)

AssertSql(
"""
SET NOCOUNT OFF;
DELETE FROM [c]
FROM [Countries] AS [c]
WHERE (
Expand Down Expand Up @@ -89,6 +93,7 @@ public override async Task Delete_GroupBy_Where_Select_First_3(bool async)

AssertSql(
"""
SET NOCOUNT OFF;
DELETE FROM [a]
FROM [Animals] AS [a]
WHERE [a].[CountryId] = 1 AND [a].[Id] IN (
Expand Down Expand Up @@ -120,6 +125,7 @@ public override async Task Delete_where_hierarchy_subquery(bool async)
@p='0'
@p1='3'

SET NOCOUNT OFF;
DELETE FROM [a]
FROM [Animals] AS [a]
WHERE [a].[Id] IN (
Expand All @@ -140,6 +146,7 @@ public override async Task Update_base_type(bool async)
"""
@p='Animal' (Size = 4000)

SET NOCOUNT OFF;
UPDATE [a]
SET [a].[Name] = @p
FROM [Animals] AS [a]
Expand All @@ -155,6 +162,7 @@ public override async Task Update_base_type_with_OfType(bool async)
"""
@p='NewBird' (Size = 4000)

SET NOCOUNT OFF;
UPDATE [a]
SET [a].[Name] = @p
FROM [Animals] AS [a]
Expand All @@ -177,6 +185,7 @@ public override async Task Update_base_property_on_derived_type(bool async)
"""
@p='SomeOtherKiwi' (Size = 4000)

SET NOCOUNT OFF;
UPDATE [a]
SET [a].[Name] = @p
FROM [Animals] AS [a]
Expand All @@ -192,6 +201,7 @@ public override async Task Update_derived_property_on_derived_type(bool async)
"""
@p='0' (Size = 1)

SET NOCOUNT OFF;
UPDATE [a]
SET [a].[FoundOn] = @p
FROM [Animals] AS [a]
Expand All @@ -208,6 +218,7 @@ public override async Task Update_base_and_derived_types(bool async)
@p='Kiwi' (Size = 4000)
@p1='0' (Size = 1)

SET NOCOUNT OFF;
UPDATE [a]
SET [a].[Name] = @p,
[a].[FoundOn] = @p1
Expand All @@ -224,6 +235,7 @@ public override async Task Update_where_using_hierarchy(bool async)
"""
@p='Monovia' (Size = 4000)

SET NOCOUNT OFF;
UPDATE [c]
SET [c].[Name] = @p
FROM [Countries] AS [c]
Expand All @@ -242,6 +254,7 @@ public override async Task Update_where_using_hierarchy_derived(bool async)
"""
@p='Monovia' (Size = 4000)

SET NOCOUNT OFF;
UPDATE [c]
SET [c].[Name] = @p
FROM [Countries] AS [c]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ public override async Task Delete_where_hierarchy(bool async)

AssertSql(
"""
SET NOCOUNT OFF;
DELETE FROM [a]
FROM [Animals] AS [a]
WHERE [a].[Name] = N'Great spotted kiwi'
Expand All @@ -32,6 +33,7 @@ public override async Task Delete_where_hierarchy_derived(bool async)

AssertSql(
"""
SET NOCOUNT OFF;
DELETE FROM [a]
FROM [Animals] AS [a]
WHERE [a].[Discriminator] = N'Kiwi' AND [a].[Name] = N'Great spotted kiwi'
Expand All @@ -44,6 +46,7 @@ public override async Task Delete_where_using_hierarchy(bool async)

AssertSql(
"""
SET NOCOUNT OFF;
DELETE FROM [c]
FROM [Countries] AS [c]
WHERE (
Expand All @@ -59,6 +62,7 @@ public override async Task Delete_where_using_hierarchy_derived(bool async)

AssertSql(
"""
SET NOCOUNT OFF;
DELETE FROM [c]
FROM [Countries] AS [c]
WHERE (
Expand Down Expand Up @@ -88,6 +92,7 @@ public override async Task Delete_GroupBy_Where_Select_First_3(bool async)

AssertSql(
"""
SET NOCOUNT OFF;
DELETE FROM [a]
FROM [Animals] AS [a]
WHERE [a].[Id] IN (
Expand Down Expand Up @@ -118,6 +123,7 @@ public override async Task Delete_where_hierarchy_subquery(bool async)
@p='0'
@p1='3'

SET NOCOUNT OFF;
DELETE FROM [a]
FROM [Animals] AS [a]
WHERE [a].[Id] IN (
Expand All @@ -138,6 +144,7 @@ public override async Task Update_base_type(bool async)
"""
@p='Animal' (Size = 4000)

SET NOCOUNT OFF;
UPDATE [a]
SET [a].[Name] = @p
FROM [Animals] AS [a]
Expand All @@ -153,6 +160,7 @@ public override async Task Update_base_type_with_OfType(bool async)
"""
@p='NewBird' (Size = 4000)

SET NOCOUNT OFF;
UPDATE [a]
SET [a].[Name] = @p
FROM [Animals] AS [a]
Expand All @@ -175,6 +183,7 @@ public override async Task Update_base_property_on_derived_type(bool async)
"""
@p='SomeOtherKiwi' (Size = 4000)

SET NOCOUNT OFF;
UPDATE [a]
SET [a].[Name] = @p
FROM [Animals] AS [a]
Expand All @@ -190,6 +199,7 @@ public override async Task Update_derived_property_on_derived_type(bool async)
"""
@p='0' (Size = 1)

SET NOCOUNT OFF;
UPDATE [a]
SET [a].[FoundOn] = @p
FROM [Animals] AS [a]
Expand All @@ -205,6 +215,7 @@ public override async Task Update_where_using_hierarchy(bool async)
"""
@p='Monovia' (Size = 4000)

SET NOCOUNT OFF;
UPDATE [c]
SET [c].[Name] = @p
FROM [Countries] AS [c]
Expand All @@ -224,6 +235,7 @@ public override async Task Update_base_and_derived_types(bool async)
@p='Kiwi' (Size = 4000)
@p1='0' (Size = 1)

SET NOCOUNT OFF;
UPDATE [a]
SET [a].[Name] = @p,
[a].[FoundOn] = @p1
Expand All @@ -240,6 +252,7 @@ public override async Task Update_where_using_hierarchy_derived(bool async)
"""
@p='Monovia' (Size = 4000)

SET NOCOUNT OFF;
UPDATE [c]
SET [c].[Name] = @p
FROM [Countries] AS [c]
Expand All @@ -265,6 +278,7 @@ public override async Task Update_with_interface_in_property_expression(bool asy
"""
@p='0'

SET NOCOUNT OFF;
UPDATE [d]
SET [d].[SugarGrams] = @p
FROM [Drinks] AS [d]
Expand All @@ -280,6 +294,7 @@ public override async Task Update_with_interface_in_EF_Property_in_property_expr
"""
@p='0'

SET NOCOUNT OFF;
UPDATE [d]
SET [d].[SugarGrams] = @p
FROM [Drinks] AS [d]
Expand Down
Loading
Loading