PCL implementation of Xamarin SQLite

I am creating a Xamarin application with PCL, and I would like to use SQLite in PCL to share the database code for specific platform projects.

I have already reviewed the Tasky Portable project, where they use an abstract class to achieve this. I had some problems implementing this method, so I was looking for another solution for using SQLite in PCL. I came across a Xamarin Forms article where they use the SQLite PCL NuGet package to implement it in PCL.

Since I am not using Xamarin Forms, what is the difference between the two methods? Can I use the NuGet batch solution to implement SQLite in PCL without using Xamarin Forms? This method seems much simpler than an abstract class.

+8
c # sqlite portable-class-library xamarin
source share
1 answer

The SQLite PCL package used by Xamarin Forms uses SQLite.Net. The Tasky Portable project uses SQLite. The difference is that SQLite.Net is a wrapper over SQLite. You use SQLite.Net as an ORM and don't worry about implementation details. Instead, you can create your POCOs in your PCL and decorate them with the appropriate attributes. The Tasky Portable project is an older way to do something in PCL. Now you have a new way of doing things with SQLite.Net.

Xamarin Forms is not a prerequisite or prerequisite for using SQLite.Net.

+7
source share

All Articles