phatboyg/NewId

NewId.NextGuid() vs NewId.NextSequentialGuid() usage

woha opened this issue · 2 comments

woha commented

What is the difference between NewId.NextGuid() and NewId.NextSequentialGuid()?
As I understood, NewId.NextGuid() generates sequential Guids.

So my question is when to use which method?

MassTransit uses NewId.NextGuid() throughout.

NextSequentialGuid is textually sorted in order, vs. the binary ordered needed by SQL Server.

woha commented

Thank you very much for the explanation!