Skip to content

Commit

Permalink
Fix command execution on wrong table (#3643)
Browse files Browse the repository at this point in the history
Also this code is never triggered from the Main(). Not sure if this is by design.
  • Loading branch information
virzak committed Dec 29, 2021
1 parent e83e21f commit dc25982
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down

0 comments on commit dc25982

Please sign in to comment.