From dc25982776cababcac311f782dad039a026c20b7 Mon Sep 17 00:00:00 2001 From: Victor Irzak <6209775+virzak@users.noreply.github.com> Date: Wed, 29 Dec 2021 05:33:11 -0500 Subject: [PATCH] Fix command execution on wrong table (#3643) Also this code is never triggered from the Main(). Not sure if this is by design. --- .../core/SqlServer/ValueGeneration/ExplicitIdentityValues.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/core/SqlServer/ValueGeneration/ExplicitIdentityValues.cs b/samples/core/SqlServer/ValueGeneration/ExplicitIdentityValues.cs index 97cfbefe38..63e879203f 100644 --- a/samples/core/SqlServer/ValueGeneration/ExplicitIdentityValues.cs +++ b/samples/core/SqlServer/ValueGeneration/ExplicitIdentityValues.cs @@ -30,9 +30,9 @@ public static void Run() context.Database.OpenConnection(); try { - context.Database.ExecuteSqlRaw("SET IDENTITY_INSERT dbo.Employees ON"); + context.Database.ExecuteSqlRaw("SET IDENTITY_INSERT dbo.Blogs ON"); context.SaveChanges(); - context.Database.ExecuteSqlRaw("SET IDENTITY_INSERT dbo.Employees OFF"); + context.Database.ExecuteSqlRaw("SET IDENTITY_INSERT dbo.Blogs OFF"); } finally {