I have a rather unique problem so I thought I'd ask here:
I need to put together a Code First model where the user has 2 ID fields, one unique (identifying each user separately), and one which won't be unique for each user (used for grouping purposes).
How do I go about getting a field in there that sometimes gets its value from the database (unique one) and sometimes is set by my code (when I am using it for grouping) ?
Are there any annotations that can help so when I assign a value, that's the one used, and when I don't assign anything, it gets a new ID automatically?