In my EF5 code-first models, creation of new records works better if the database sets the primary key. I am using a Guid for primary key and if DatabaseGeneratedOptio
DatabaseGeneratedOptio
AddOrUpdate has an overload that allows you to specify the key
From MSDN
So you need to supply the method with the natural key:
context.Record.AddOrUpdate(c => c.RecordName, new Record() { RecordName = "New Record", Created = DateTime.UtcNow, Updated = DateTime.UtcNow, })