O'Reilly logo

Mastering Internet of Things by Peter Waher

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

Initializing the persistence library

We then go on to initialize our persistence library. It is accessed through the static Database class, defined in the Waher.Persistence namespace. Initialization is performed by registering one object database provider. This database provider will then be used for all object database transactions. In our case, we register our local files object database provider, FilesProvider, defined in the Waher.Persistence.Files namespace:

Database.Register(new FilesProvider( 
   Windows.Storage.ApplicationData.Current.LocalFolder.Path + 
         Path.DirectorySeparatorChar + "Data", 
   "Default", 8192, 1000, 8192, Encoding.UTF8, 10000)); 

The first parameter defines a folder where database files will be stored. In our case, we store ...

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