smeacham

Database_Android.cs

Jun 7th, 2016
359
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.84 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.IO;
  6.  
  7. using Android.App;
  8. using Android.Content;
  9. using Android.OS;
  10. using Android.Runtime;
  11. using Android.Views;
  12. using Android.Widget;
  13.  
  14. using SQLite;
  15. using SQLiteNetPCLVS.Droid;
  16.  
  17. [assembly: Xamarin.Forms.Dependency(typeof(Database_Android))]
  18. namespace SQLiteNetPCLVS.Droid
  19. {
  20.     public class Database_Android : IDatabase
  21.     {
  22.         public Database_Android() { }
  23.         public SQLiteConnection DBConnect()
  24.         {
  25.             var filename = "ItemsSQLite.db3";
  26.             string folder = System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal);
  27.             var path = Path.Combine(folder, filename);
  28.             var connection = new SQLiteConnection(path);
  29.             return connection;
  30.         }
  31.     }
  32. }
Add Comment
Please, Sign In to add comment