Skip to content

Instantly share code, notes, and snippets.

Created August 15, 2018 16:05
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Example of how to implement local database in your Xamarin.Forms applications -
using DemoLiteDB.iOS;
using System;
using System.IO;
using Xamarin.Forms;
[assembly: Dependency(typeof(Helper))]
namespace DemoLiteDB.iOS
public class Helper : IHelper
public string GetFilePath(string file)
string document = Environment.GetFolderPath(Environment.SpecialFolder.Personal);
string library = Path.Combine(document, "..", "Library", "Databases");
if (!Directory.Exists(library))
return Path.Combine(library, file);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment