EF Core 記憶體中資料庫提供者EF Core In-Memory Database Provider

此資料庫提供者可讓 Entity Framework Core 搭配使用記憶體內部資料庫。This database provider allows Entity Framework Core to be used with an in-memory database. 雖然記憶體內部模式中的 SQLite 提供者作為關聯式資料庫的替代測試項目可能較為合適,但此資料庫作為測試用途仍相當實用。This can be useful for testing, although the SQLite provider in in-memory mode may be a more appropriate test replacement for relational databases. Entity Framework Core 專案的維護包含此提供者。The provider is maintained as part of the Entity Framework Core Project.


安裝 Microsoft.EntityFrameworkCore.InMemory NuGet 套件Install the Microsoft.EntityFrameworkCore.InMemory NuGet package.

Install-Package Microsoft.EntityFrameworkCore.InMemory

開始使用Get Started

下列資源將協助您開始使用此提供者。The following resources will help you get started with this provider.

支援的資料庫引擎Supported Database Engines

  • 內建記憶體中資料庫 (僅供測試用途所設計)Built-in in-memory database (designed for testing purposes only)