1

I want to know if it's possible to use custom ID Integers as primary key?

So instead of the default Ids 1,2,3,4,5,... I would like to use fixed Ids like 1422,1424,1426, ...

I get these Ids from a feed and I will be using relationships based on those values. In my current setup, I have a general Id (auto generated) and a second FeedId column. Can't I just replace to auto-generated Id so it uses the FeedId?

Fred Fickleberry III
  • 2,439
  • 4
  • 34
  • 50
  • 1
    decorate [DatabaseGenerated(DatabaseGeneratedOption.None)] and define your id, like this http://stackoverflow.com/questions/7206273/disabling-identity-auto-incrementing-on-integer-primary-key-using-code-first – testCoder Nov 01 '12 at 12:08

0 Answers0