I am creating an invoice table with code first migrations, the table needs to have a unique invoice number. I do not want to make this field my primary key. My preferred method to go about this is to use Guid for the invoice number, this way a unique value gets created everytime I insert an invoice item. I could generate random strings but I do not want to have to write logic to create random strings.
Please note, I do not want to install any external libraries for this. I am doing my mappings with Fluent API and not Data Annotations. Please factor that into your answer.
Is this possible for me to achieve just using a Guid column?
Thanks in advance.