O'Reilly logo

Cross-platform UI Development with Xamarin.Forms by Paul F. Johnson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The database helper class

All smart phones come with a version of SQLite installed (including the likes of the Blackberry range), and while SQLite provides a number of inbuilt methods of storing data, they are often cumbersome and in terms of what they do (or how they do it), aren't exactly clear.

The second problem is that the connection has to be made every time a query is to be made.

Thankfully, it is more than possible to write a helper class that deals with the creation, insertion, amendment, and retrieval of data.

There are a number of advantages to having a helper class in this situation:

  • All the data methods are in one place (reducing the number of times code has to be written; therefore, less opportunity for error)
  • Potential for commonality ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required