Database Providers
- Database Providers
- Entity Framework Core can access many different databases through plug-in libraries called database providers.
- Most database providers for EF Core are distributed as NuGet packages.
- Adding a database provider
- Once installed, you will configure the provider in your DbContext, either in the OnConfiguring method or in the AddDbContext method if you are using a dependency injection container.
- Database providers can extend EF Core to enable functionality unique to specific databases. Some concepts are common to most databases, and are included in the primary EF Core components. Such concepts include expressing queries in LINQ, transactions, and tracking changes to objects once they are loaded from the database.
- Some concepts are specific to a particular provider. For example, the SQL Server provider allows you to configure memory-optimized tables (a feature specific to SQL Server).
- Other concepts are specific to a class of providers. For example, EF Core providers for relational databases build on the common Microsoft.EntityFrameworkCore.Relational library, which provides APIs for configuring table and column mappings, foreign key constraints, etc.
Code
- Startup.cs
Sqlite
- Sqlite
- SQLite is a C-language library that implements a small, fast, self-contained, high-reliability, full-featured, SQL database engine.
- SQLite is the most used database engine in the world.
- SQLite is built into all mobile phones and most computers and comes bundled inside countless other applications that people use every day.
- The SQLite file format is stable, cross-platform, and backwards compatible and the developers pledge to keep it that way through the year 2050.
- SQLite database files are commonly used as containers to transfer rich content between systems and as a long-term archival format for data.
- DB browser for Sqlite
- Download: DB browser for Sqlite
- Show your Database on GUI