Is the Microsoft.data.Sqlite package the correct Sqlite DAL library to use for new projects?

Hi,
I'm starting a new Xamarin Forms project using .NET Standard 2.0.
It appears that the Microsoft.data.Sqlite package on Nuget is the correct (MSFT supported) API to use for ADO.NET style access to SQLite.

The documentation on this site still refers to Mono.data.sqlite. Is this out of date?

Answers

  • JGoldbergerJGoldberger USMember, Forum Administrator, Xamarin Team, University Xamurai
    edited July 2018

    @Andy

    I think most use a NuGet package called sqlite-net-pcl as per this document: https://docs.microsoft.com/en-us/xamarin/xamarin-forms/app-fundamentals/databases#using-sqlite

  • AndyAndy Member ✭✭

    I don't want to use the ORM API. I need Mono.data.Sqlite APIs to execute my own ADO.NET styled queries.

    How can this possibly not be supported?

  • wondererwonderer Member
    edited December 2018

    Hi Andy,

    I am following down the same path, running my SQLight on Desktop took me 1 days, running he Indexeddb on javascript one days,

    I have been fiddling around with these SQlight implementation for days now, and I dont seem to be coming to an end.

    Hvae you found a Microsoft.data.Sqlite Xamarin forms implementation sample with all the standard functions as sample , create DB, create table, insert, select, delete etc for Droid, IOS, UWP

    would be glad to hear from your experience, I did not find anything yet, besides this here,
    nuget /packages/Microsoft.Data.SQLite/

    thanxs Walter

  • AndyAndy Member ✭✭

    Hi Walter,
    So we are having success using .NET Standard 2.0 based Xamarin forms app together with the Microsoft.data.sqlite nuget package targeting iOS and Android.

    The only thing you need to do is implement an interface in your iOS and Android app projects to provide the application's private storage file folder path to your shared Xamarin forms project so it can create the Sqlite DB there.

Sign In or Register to comment.