You resolve your auto increment jumping from this
you can also resolve the issue into another way if you are using EDMX.
Before inserting data into table get the max id value from your table.
int maxAge = context.Persons.Max(p => p.Age);
Now add your increment number maxAge+1
Map the id value with your table.
NB: You table Identity specification : Is Identity Will be no.
NB: You table Identity specification : Is Identity Will be no.
Comments
Post a Comment