A simple class with an auto-incremented Key
column
public class SomeClass
{
[Key]
public long SomeClassId { get; set;}
}
Normally the SomeClassId
will start and auto-increment from 1. Is there anyway to force the ID to start from a specific number, say 10001?
It was suggested here to execute the CHECKIDENT
command through Sql()
. But I wonder if there are other ways to go about this?
Thanks!
CHECKIDENT
. I am asking if we can achieve in other ways. Besides, that article is for EF6, i am asking on EF Core 2.2