
Next, we must do some work in the iOS project to make this work. Because every platform has a different storage location, we set the databasePath accordingly based on the device platform. We add a DbSet property for each entity that we will store in the database. Our context class will look like this: public class ApplicationDbContext : DbContext Then, we create a folder called DatabaseContext that will contain our context class. Also install the Microsoft.EntityFrameworkCore here as well. Be careful when you select the target framework for the class library, it should be. Then, create a new class library which will contain all the class entities we will store in our database. Next thing, install Microsoft.EntityFrameworkCore and in every project, the traditional and the class library.

Nothing fancy here, just do the usual project creation from the wizard. Let us go ahead and create a new Xamarin Forms App. If not, I suggest you get familiar with them first.

NET Core tools EntityFramework Core, and all other tools needed to develop a Xamarin Forms app. Note: I assume that you have basic knowledge and have installed the. In this article we will explain in a step-by-step tutorial how to set up a Xamarin Forms App with a SQLite local storage, and we are going to use EntityFramework Core to generate a Code-First Database and apply that migration to our app. Now it is possible to use EntityFramework Core to generate a local storage for our Xamarin Applications. NET Core and EntityFramework Core a new possibility arose when it comes to data persistence. Data persistence plays a big role in almost every application there is.
