I want to have a sequence in my database which is not bound to a specific column or table. I found this:
public int GetNextSequenceValue()
{
var rawQuery = Database.SqlQuery<int>("SELECT NEXT VALUE FOR dbo.TestSequence;");
var task = rawQuery.SingleAsync();
int nextVal = task.Result;
return nextVal;
}
This seems to be exactly what I want, however I'm using code-first and I don't see a way to create the sequence in the first place.
So how do I create a sequence with code-first?