EasyDb.NET -


Apache
Windows
C#

软件简介

EasyDb.NET 是一个 .NET 的非常轻量级的数据库操作助手类。内部由 Dapper 驱动。

示例代码:

IConnectionFactory factory;

// build factory with given DbProviderFactory and Dialect.
factory = ConnectionFactoryBuilder.NewBuilder(
  System.Data.SQLite.SQLiteFactory.Instance,
  "Data Source=test.db;Pooling=true;FailIfMissing=false",
  "SQLiteFactory",
  new SQLiteDialect()
).Build();

// or build from strings
factory = ConnectionFactoryBuilder.NewBuilder(
  "mysql.data",
  "Server=127.0.0.1;Uid=root;Pwd=asdf;Database=sample;",
  "MySQLFactory",
  "LX.EasyDb.Dialects.MySQLDialect"
).Build()