简体   繁体   English

Xamarin的ADO.NET SQLite pcl库

[英]ADO.NET SQLite pcl library for Xamarin

Is there available ADO.NET pcl library for sqlite? sqlite是否有可用的ADO.NET pcl库? It can be also simple (not pcl) library. 它也可以是简单的(不是pcl)库。 I am looking especially support for Windows Runtime (Windows 8.1 metro app). 我正在寻找对Windows运行时(Windows 8.1 Metro应用程序)的特别支持。 As I know there is mono implementation of ado.net for Android and IOS. 据我所知,有针对Android和IOS的ado.net单声道实现。 But I cannot find any implementation for Windows Runtime. 但是我找不到Windows运行时的任何实现。

The libraries like sqlite-net-pcl are not applicable, because I need to create dynamic set of data. sqlite-net-pcl之类的库不适用,因为我需要创建动态数据集。

Since ADO.NET is fairly old, it's more of a platform implementation rather than a PCL-available class. 由于ADO.NET相当老,所以它更多是一种平台实现,而不是PCL可用类。 However you could write your own wrapper in which Windows platforms would call into Microsoft.Data.Sqlite or System.Data and Mono/Xamarin platforms would call into Mono.Data.Sqlite . 但是,您可以编写自己的包装程序,在该包装程序中Windows平台可以调用Microsoft.Data.SqliteSystem.DataMono/Xamarin平台可以调用Mono.Data.Sqlite

Seeing that Microsoft.Data.Sqlite is now more portable(available in netstandard1.3 ), you should be able to just use Microsoft.Data.Sqlite in your projects as long as you target netstandard1.3+ as a means to get a DbConnection in true ADO.NET fashion. 看到Microsoft.Data.Sqlite现在具有更高的可移植性(可在netstandard1.3netstandard1.3 ),只要将netstandard1.3+作为获取DbConnection一种手段,就应该可以在项目中使用Microsoft.Data.Sqlite 。以真正的ADO.NET方式。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM