Entity Framework, in Code First Manner, can auto-generate the scaffolding for accessing a database from an app from an app’s model class. In a previous blog I covered some issues wrt using Entity Framework Core with a Universal Windows (Platform) app with a Sqlite backend database. The entities are specified as classes in in a .Net Core class project separate to the app project (within the same solution). The issue addressed in that blog was a problem referencing the class library from the UWP project. This blog revisits the same topic with an emphasis upon the steps required to implement an EF Core backed UWP app.

With no version of SQL Server and SQL Compact available for Windows 10 IoT and Windows 10 Phone, the suggested alternative is SQLite. Whilst early evaluations indicate it isn’t available for Win10 IoT Background and Console apps, it’s not too hard to use SQLite with a Windows 10 UWP (Universal) app. The app can be rebuilt without modification and using the exact same project content for the desktop, phone and IoT Windows 10 targets.