


- SQLITE TUTORIAL HOW TO
- SQLITE TUTORIAL INSTALL
- SQLITE TUTORIAL FULL
- SQLITE TUTORIAL ANDROID
- SQLITE TUTORIAL CODE
To get access to SQLite from a Shared project, you simply add the source code to the project. If you remember from a previous tutorial, you can't add references to a Shared project.
SQLITE TUTORIAL HOW TO
If you've chosen the Shared project template earlier in the tutorial, you may be wondering how to get access to the SQLite package. Which one do you choose if you went the Shared project route? None. Since I chose to go the PCL route for my Xamarin.Forms project, I will need to select the SQLite.Net PCL package to include into my project. This will show you a rather large collection of packages that you can include in your project. We access this NuGet package by right-clicking on either Packages or References, depending on which IDE you are using, and select Add Package (or Reference). NET wrapper around SQLite that will allow us to access the native SQLite functionality from a Xamarin.Forms PCL or Shared project.
SQLITE TUTORIAL INSTALL
We need to install a new package into our project named SQLite.Net. Now that we have our basic project structure set up, we can start to add access to SQLite to our PCL project.
SQLITE TUTORIAL ANDROID
IntroToSQLite.Android - Android project.

Your solution will contain four projects: I will call this project IntroToSQLite. After you click the OK button, your IDE will go through the process of creating your solution. You can give the project any name you like. You can follow along using either one, but there will be a slight difference if you choose the Shared template later on. You can use either the PCL or Shared version of the template, but for this case, I will be using the PCL. To do this, simply select the Mobile Apps project template family on the left and choose one of the Xamarin.Forms templates on the right. We start the process by creating a new Xamarin.Forms app. In this tutorial, I will be using a Mac running Xamarin Studio, but you can just as easily be using Xamarin Studio or Visual Studio running on a PC. Let's start by creating a simple Xamarin.Forms application. All this functionality and cross platform accessibility is great, but how will we get access to the native platform implementations from our C# code in Xamarin.Forms? From a nice NuGet package, that's how. Getting access to SQLite functionality in Windows Phone apps requires one additional step that we will go over a little later. This means that you can use this technology right out of the box when you choose to write a Xamarin.Forms app. The SQLite engine is readily available on both iOS and Android. In the world of Xamarin.Forms, SQLite is a natural fit for a very simple reason. These are the concepts that we will be focusing on in this tutorial. Rest assured that you will have the ability to easily create a table structure to store data and retrieve it in your app. We will not be covering all the features of SQLite in this tutorial simply because there are too many to go through. Not only do you get all of this, you also have access to the source code, because it's open source.
SQLITE TUTORIAL FULL
All this means is that you have a full featured mechanism to store your data in a structured way. What exactly is SQLite? SQLite is a public domain, zero configuration, transactional SQL database engine. You have now seen the term SQLite a couple of times in this tutorial, it's time to get down to the meat. But what do you do now that you need to store information within your app? Don't worry, there's a very simple solution to this problem, SQLite. That data could be user data, statistics, or anything else of interest that either you or the user will be interested in at some point in the use of your app.Īt this point, let's assume that you have decided to go the Xamarin.Forms route, because you are interested in targeting several platforms not only in the logic for your app, but also for the user interface layer. No matter what kind of app you are writing, whether it's a game or some sort of utility, you are going to need to store data at some point. So why do you need to care about data when it comes to your app? Because it is all around you. Thanks to Xamarin and open source software, you can easily store your data with an industry tested platform, SQLite. You are going to need to store this information somewhere and be able to get at it easily. Dealing with data means more than processing and displaying information to the end user. At some point in your mobile development career, you are going to need to deal with data.
