I\'ve seen many posts and answers regarding how to mark a field as the identity column. Many of them are outdated and are targeting older versions of Entity Framework.
Either, your choice. I use a mixture of the two: attributes for simple things like this, and the modelBuilder
for more complex scenarios the attributes don't cover. They're both equally valid, and you'll see that under the covers (EF 'conventions'), the attributes are used to tell the modelBuilder
what to do.