Database First to Code First EF - Migrations Key and Constraint Names not matching DB
问题 I recently updated my project from Database First to a Code First Model, using this method: Link Everything seemed to be working until I wanted to update my FK and PKs on an existing table. This was a 1-0, 1-1 relationship. So the PK of Company table was the FK and PK of the DriverScorecardSetting table. So this is the entity that the Tool generated for the DriverScorecardSetting table. [Table("DriverScorecardSetting")] public partial class DriverScorecardSetting { [Key] [DatabaseGenerated