Performing CRUD operations in SQLite
CRUD operations (create, read, update, delete) are the four basic functions in persistent storage. Whatever the storage option, you will need to perform these actions.
There are patterns and best practices to achieve reusable data access components and the most common implementation is the Repository Pattern. In this recipe, we create a generic repository that we use to perform CRUD operations against a SQLite database.
How to do it…
- In Visual Studio, create a Blank App (Xamarin.Forms Portable) project named
XamFormsCRUDSQLite
from the top menu, File | New | Project…. - For all the projects in the solution, we need the
SQLite.Net-PCL
and SQLite.Net.Async-PCL NuGet packages. Right-click on every project and choose ...
Get Xamarin: Cross-Platform Mobile Application Development now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.