DEV Community

Ulisses Meira
Ulisses Meira

Posted on

EF Core Identity field increment 1000 by insert

I had a problem with EF Core with identity field in SQL Server. When saved a register, the id value jumped to 1002, 2003.. and counting..

The solution was disable the IDENTITY_CACHE...

ALTER DATABASE SCOPED CONFIGURATION SET IDENTITY_CACHE = OFF
GO
More information here..

Top comments (0)