In my Global.asax file, under my ApplicationStart() function I want to drop a table and recreate it cleanly when application starts. What is the best way to accomplish this so it is seamless every time i start my program? To get a better idea, I am keeping track of online users in a table, but when the application starts up again, obviously I would like to clear this table out. I need to drop and recreate the table because the identity seed won't start over if i simply truncate it (I am using sql azure so i cannot run a db command to reset the seed). Also, if i did just truncate my table, would not resetting the seed be a bad practice? I've done this and im already at like id 1000, just after testing.
TRUNCATE TABLEcommand does reset the seed of an identity column. It'sDELETE FROMthat doesn't. Can you show your current code that clears the table?