EF Core 1.1 中的新增功能New features in EF Core 1.1


欄位對應Field mapping

可讓您設定屬性的支援欄位。Allows you to configure a backing field for a property. 對於唯讀屬性或具有 Get/Set 方法而非屬性的資料而言,這非常實用。This can be useful for read-only properties, or data that has Get/Set methods rather than a property.

對應到 SQL Server 中的記憶體最佳化資料表Mapping to Memory-Optimized Tables in SQL Server

您可以將實體所對應的資料表指定為記憶體最佳化。You can specify that the table an entity is mapped to is memory-optimized. 根據您的模型使用 EF Core 來建立及維護資料庫 (透過移轉或 Database.EnsureCreated()),將為這些實體建立記憶體最佳化資料表。When using EF Core to create and maintain a database based on your model (either with migrations or Database.EnsureCreated()), a memory-optimized table will be created for these entities.

Change trackingChange tracking

來自 EF6 的其他變更追蹤 APIAdditional change tracking APIs from EF6

例如 ReloadGetModifiedPropertiesGetDatabaseValues 等。Such as Reload, GetModifiedProperties, GetDatabaseValues etc.


明確式載入Explicit Loading

可讓您觸發先前從資料庫載入之實體上瀏覽屬性的母體擴展。Allows you to trigger population of a navigation property on an entity that was previously loaded from the database.


提供根據實體主索引鍵值擷取實體的簡單方法。Provides an easy way to fetch an entity based on its primary key value.


連線恢復功能Connection resiliency

自動重試失敗的資料庫命令。Automatically retries failed database commands. 連線到其中的暫時性失敗為常見情況的 SQL Azure 時,這非常實用。This is especially useful when connection to SQL Azure, where transient failures are common.

簡化的服務取代Simplified service replacement

讓您輕鬆取代 EF 所使用的服務。Makes it easier to replace internal services that EF uses.