Connecting to a local SQLite database via Entity Framework Core
When discussing data retrieval from a database, some might assume they’ll have to handle complex SQL queries. While SQL queries may be necessary for intricate scenarios, most of the time you’ll work with object-relational mapping (ORM), which provides a high-level abstraction for database operations.
Object-relational mapping
Object-relational mapping is a technique offering a high-level abstraction over database objects, such as tables and rows. In simple words, tables are turned into collections, rows into objects, and cell values into properties. ORM handles all low-level operations, including SQL generation, object mapping, and database schema management.
In this chapter, we’ll use EF Core as our object-relational mapper and SQLite as our database. This combination is a popular choice for storing data locally in .NET MAUI applications because SQLite is a very lightweight database suitable...