I need a serial number to be stored in data base with a record when I click a button, so far I did this and it works it generates serial number ,but the problem when I exit the app and start again the serial number starts from 0 again and that doesn't work because in the database its primary key. so I need it to continue where it left off. im sorry if im not explaining well
public static class SequentialNumber
{
private static int id=0;
public static string GetId()
{
id++;
return id.ToString();
}
}