0 帶有屬性的數據註釋 [Key]屬性。 用流利的API modelBuilder.Entity<yourModel>().HasKey(t => t.yourProp); 來源 2015-06-16 09:14:53 jonas