Building a data access layer using SQLite

In the previous chapter, we focused on project architecture and we discussed the concepts one layer for data access this is where our database layer sits. Our data access layer is where we will be storing local text files.

SQLite is the most commonly used database framework for mobiles. It is an in-process library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine, and is free to use.

Note

There are other frameworks that Xamarin supports such as ADO.NET and Realm, but it has been proven that SQLite is the most efficient database layer.

The first step in the setup process is to add the following SQLite NuGet packages in our FileStorage.Portable project:

  • SQLite.Net.Async-PCL ...

Get Xamarin Blueprints 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.