SQLite is a lightweight, server-less database, it's great for embedding into client application. It works across Windows, iOS, Android, browers.

Code snippets

Create database connection

var connection = new SQLiteAsyncConnection("testdb.sqlite");

Create table

await connection.CreateTableAync<MyClass>();

Insert Data

await connection.InsertAsync(new MyClass());

Build up your class

public class MyClass

{

  [PrimaryKey]

  public string Id { get; set; }

  public DateTime CreatedOn { get; set; }

  public string Name { get; set; }

  [Ignore]

  public ComplexClass IgnoreMe { get; set; }

}

Querying

var items = connection.Table<MyClass>()

            .Where(x=>x.Name == "Bob")

            .FirstOrDefault();

Starting off

var file = await Windows.ApplicationModel.Package.Current.InstalledLocation.GetFileAsync("Assets\\dbfile.sqlite");

try

{

  await file.CopyAsync(ApplicationData.Current.LocalFolder);

}

catch

{

}

sqlite:

http://www.sqlite.org/

sqlite-net:

https://github.com/praeclarum/sqlite-net

sqlite-net-wp8:

https://github.com/peterhuene/sqlite-net-wp8

Sample:

http://bit.ly/TLWrZw

Introduction of SQLite的更多相关文章

  1. [转]MBTiles移动存储简介

    首先奉上官网地址http://mapbox.com/developers/mbtiles/#storing_tiles 由于英文水平有限,看资料很费眼睛,特将它翻译成中文 存储瓦片 地图制作者面对一个 ...

  2. An Introduction To The SQLite C/C++ Interface

    1. Summary The following two objects and eight methods comprise the essential elements of the SQLite ...

  3. [Sqlite3] Sqlite Introduction

    Check whether you have sqlite3 installed: sqlite3 -version To create a new db: sqlite3 <filename. ...

  4. About SQLite

    About SQLite See Also... Features When to use SQLite Frequently Asked Questions Well-known Users Boo ...

  5. C# & SQLite - Storing Images

      Download source code - 755 KB Introduction This article is to demonstrate how to load images into ...

  6. SQLite Helper (C#) z

    http://www.codeproject.com/Articles/746191/SQLite-Helper-Csharp Introduction I have written a small ...

  7. java链接sqlite资料整理

    0.SQLite三种JDBC驱动的区别 摘自http://blog.sina.com.cn/s/blog_654337ca01016x4n.html 在DBeaver中看到SQLite有三种JDBC驱 ...

  8. dashDB - Introduction and DB Tools

    dashDB - Introduction dashDB is a database that is designed for performance and scale. It offers sea ...

  9. Architecture of SQLite

    Introduction This document describes the architecture of the SQLite library. The information here is ...

随机推荐

  1. 不通过App Store实现ios应用分发下载安装

    最近公司的项目准备着手宣传工作了,宣传手册上要印制App的下载地址二维码,但是客户端应用还未上线,需要一种临时的方案解决应用分发下载问题,通常ios应用必须通过苹果应用商店才能下载安装,但是也可以看到 ...

  2. C# 编码转换 UTF8转GB2312 GB2312转UTF8

    /// <summary> /// GB2312转换成UTF8 /// </summary> /// <param name="text">&l ...

  3. JQuery 操作对象的属性值

    通过JQuery去操作前台对象(div,span...)的属性是很常见的事情,本文就简单的介绍几种操作情形. 1):通过属性值去获取对象 2):用JQuery去修改对象的属性值 3):获取并修改对象的 ...

  4. Codeforces Round #198 (Div. 1) D. Iahub and Xors 二维树状数组*

    D. Iahub and Xors   Iahub does not like background stories, so he'll tell you exactly what this prob ...

  5. Arduino101学习笔记(十二)—— 101定时器中断

    一.API 1.开定时器中断 //*********************************************************************************** ...

  6. 智能车学习(十三)——角度控制

    一.手册代码以及图示 二.流程说明 1.角度计算函数说明 //===================================================================== ...

  7. 开始我的PostgreSQL的学习之旅

    经过这么长时间的学习,终于确定了我的研究方向是PostgreSQL的空间数据库的设计流程,具体怎样实现这个过程,其难度是挺大的,我必须克服掉,尽量得往前看.大家有相同的研究方向的,可以一同来学习,相互 ...

  8. How to AC it

    旋转卡壳 DP,网络流

  9. LR通过snmp监控linux下的mysql

    LR通过snmp监控linux下的mysql 在linux底下安装配置snmp: 1.使用系统盘安装rpm包(这种方式最好) 2.在www.net-snmp.org处下载net-snmp安装(安装后有 ...

  10. 20145223《Java程序程序设计》第3周学习总结

    20145223 <Java程序设计>第3周学习总结 教材学习内容总结 第四章内容 1.类与对象 如何定义一个包含有几个值域(Field成员)就是需要我们定义一个类(Class),书上给的 ...