| 注册
请输入搜索内容

热门搜索

Java Linux MySQL PHP JavaScript Hibernate jQuery Nginx
jopen
10年前发布

.NET 的非常轻量级的数据库操作助手类:EasyDb.NET

EasyDb.NET 是一个 .NET 的非常轻量级的数据库操作助手类。特性:

  • Easy. IDbConnection is extended by a new interface IConnection with enhanced query methods. Similar code, different experience. Helper methods may still be used to get rid of the repeating trivia such as opening and closing connections and make coding clean and simple.
  • Cross-database. EasyDb.NET works across all .NET ADO providers. Most times you don't need to concern details of DB specific differences since there is the hibernate-like dialecting.
  • Typed query. Query results can be mapped into strongly typed or dynamic objects. ORMs can also be customized with help of Mapping attributes.
  • Support OO-style Criterion query.
  • Other features from Dapper. EasyDb.NET is internally driven by Dapper, an amazing project by Sam Saffron.
  • Support .NET 2.0, 3.0, 3.5, 4.0.

用法:

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()

项目主页:http://www.open-open.com/lib/view/home/1408699721897

 本文由用户 jopen 自行上传分享,仅供网友学习交流。所有权归原作者,若您的权利被侵害,请联系管理员。
 转载本站原创文章,请注明出处,并保留原始链接、图片水印。
 本站是一个以用户分享为主的开源技术平台,欢迎各类分享!
 本文地址:https://www.open-open.com/lib/view/open1408699721897.html
持久层框架 EasyDb.NET