整理一下近期的收藏夹,以后根据项目中的使用情况,进行更新。
NuGet
各种数据库的连接字符串写法
ConnectionStrings.com - Forgot that connection string? Get it here!
SQLite
.NET封装:System.Data.SQLite: Home
1、连接字符串
Normally, GUIDs are stored in a binary format. Use this connection string to store GUIDs as text.
Data Source=c:\mydb.db;Version=3;BinaryGUID=False;
Note that storing GUIDs as text uses more space in the database.
BinaryGUID=False一定要的,否则使用Guid作为参数查询数据的时候查不出来,即使Guid是对的。这是因为SQLite默认将Guid类型的数据以Binary类型来存储。
2、使用System.Data.SQLite
安装部署时,只需要复制.db数据库文件以及System.Data.SQLite的相关dll,不需要其他安装
2.1、VS2015设计时支持
在System.Data.SQLite: Downloads Page,下载sqlite-netFx46-setup-bundle-x86-2015-1.0.99.0.exe
This is the only setup package that is capable of installing the design-time components for Visual Studio 2015.
2.2、安装
使用NuGet,搜索并安装System.Data.SQLite.Core
自动添加文件
自动添加引用
Dapper
官网:GitHub - StackExchange/dapper-dot-net: Dapper - a simple object mapper for .Net
Dapper C# 访问SQLite - 百千合 - 博客园
SQLite + Dapper = Simple Data Access Layer
安装
使用NuGet,搜索并安装Dapper
自动添加文件
自动添加引用
Json.NET
GitHub - JamesNK/Newtonsoft.Json: Json.NET is a popular high-performance JSON framework for .NET
安装
使用NuGet,搜索并安装Newtonsoft.Json
自动添加文件
自动添加引用
原文:http://www.cnblogs.com/MrEggplant/p/5311655.html