Monday, October 31, 2016

sql auto increment jump

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.

C# print file on LAN Printer

If you want to print any file on network printer then you can try with this code block // Change Default Printer System.Ma...