Creating a SQLite data store
Until now, the My Media Collection project has only been working with data stored inside in-memory collections. This means that every time the app is closed, all the user's data is lost. It has also meant calling a method to populate all the lists with hardcoded seed data with every launch.
In the previous chapter, we took the first step in creating a maintainable data service for the application. By creating a data service class that implements IDataService
, no changes will be required in the ViewModel
classes. This section will focus on creating a new SqliteDataService
class so that you can use SQLite for data access. The starting code for this chapter can be found on GitHub at https://github.com/PacktPublishing/-Learn-WinUI-3.0/tree/master/Chapter06/Start.
What is SQLite?
SQLite (found at https://sqlite.org/) is a SQL-based database that is frequently used by mobile apps and small desktop applications. It is a popular choice because it...