用在.NET應用中的SQLite客戶端和ORM:sqlite-net

jopen 10年前發布 | 22K 次閱讀 .NET開發 sqlite-net

sqlite-net是一個開源的,非常小的庫用于在.NET 和 Mono 應用中將數存儲至 [http://www.sqlite.org SQLite 3 數據庫]。它采用C#開發,能夠很簡單得編譯至你的項目中。它支持平臺包括Mono for Android, .NET, Silverlight, WP7, WinRT, Azure等。

sqlite-net 設計成一個快捷,方便的數據庫層。它的設計遵循這些目標:

  • Very easy to integrate with existing projects and with MonoTouch projects.

  • Thin wrapper over SQLite and should be fast and efficient. (The library should not be the performance bottleneck of your queries.)

  • Very simple methods for executing CRUD operations and queries safely (using parameters) and for retrieving the results of those query in a strongly typed fashion.

  • Works with your data model without forcing you to change your classes. (Contains a small reflection-driven ORM layer.)

  • 0 dependencies aside from a compiled form of the sqlite2 library.

    var conn = new SQLiteConnection("foofoo");
    var query = conn.Table<Stock>().Where(v => v.Symbol.StartsWith("A"));

    foreach (var stock in query)
        Debug.WriteLine("Stock: " + stock.Symbol);

項目主頁:http://www.baiduhome.net/lib/view/home/1418109333558

 本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
 轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
 本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!