0

I am trying to implement the sqlite.Net Extension in my xamarin forms project. I added the sqlite.net extension from nuget. Now I am trying to create the connection with db, but not getting can I do that. I am trying to do it like https://bitbucket.org/twincoders/sqlite-net-extensions

I am not getting "UpdateWithChildren" or "GetWithChildren" methods in my connection object.

Here is the code that I am using to create the connection:

 public SQLiteAsyncConnection GetConnection()
    {
        var sqliteFilename = "SQLiteEx.db3";
        string documentsPath = Environment.GetFolderPath(Environment.SpecialFolder.Personal); // Documents folder
        string libraryPath = Path.Combine(documentsPath, "..", "Library"); 
        var path = Path.Combine(libraryPath, sqliteFilename);

        if (!File.Exists(path))
        {
            File.Create(path);
        }


        var conn = new SQLiteAsyncConnection(path, true);

        return conn;
    }
anand
  • 1,399
  • 5
  • 23
  • 55
  • You are creating an async-based DB connection, add the async version of the package: `SQLiteNetExtensions.Async` – SushiHangover Dec 26 '18 at 11:44
  • Thanks, do you any example how to create this connection object with help of sqlitenetextension? – anand Dec 26 '18 at 11:58

0 Answers0