
Save the changes to NoteDatabase.cs by pressing CTRL+S. This path will be provided by the App class in the next step. In addition, the NoteDatabase constructor takes the path of the database file as an argument. The code uses asynchronous SQLite.NET APIs that move database operations to background threads. This class contains code to create the database, read data from it, write data to it, and delete data from it. In NoteDatabase.cs, replace the existing code with the following code: using ĭatabase = new SQLiteAsyncConnection(dbPath) In Solution Explorer, in the Notes project, add a new class named NoteDatabase to the Data folder. In Solution Explorer, add a new folder named Data to the Notes project.

The application will not currently build due to errors that will be fixed in subsequent steps. Save the changes to Note.cs by pressing CTRL+S. The ID property is marked with PrimaryKey and AutoIncrement attributes to ensure that each Note instance in the SQLite.NET database will have a unique id provided by SQLite.NET. This class defines a Note model that will store data about each note in the application. In Solution Explorer, in the Notes project, open Note.cs in the Models folder and replace the existing code with the following code: using System This package will be used to incorporate database operations into the application, and will be added to every project in the solution.
HOW TO CREATE A DATABASE IN SQLITE MANAGER MAC INSTALL
In the NuGet Package Manager, select the correct sqlite-net-pcl package, check the Project checkbox, and click the Install button to add it to the solution:


The correct package has these attributes:ĭespite the package name, this NuGet package can be used in. There are many NuGet packages with similar names.
