I\'m using the new EF code first to one project of mine, and i\'m getting a weird error, my mode is:
abstract class Member { public virtual int MemberId; ..
I just came across this. Like the marked answer states, TPC doesn't set the key to an identity. So you can use an annotation for it:
[DatabaseGenerated(DatabaseGeneratedOption.Identity)] public int ID { get; set; }