ORM

https://github.com/StackExchange/dapper-dot-net
http://fluentdata.codeplex.com/
https://github.com/toptensoftware/PetaPoco
https://github.com/schotime/NPoco
https://github.com/ServiceStack/ServiceStack.OrmLite

使用Dapper

1.已经在项目中使用了Dapper,感觉还行,基本可以满足需求
2.使用Dapper一段时间,AnsiStringFixedLength 与AnsiString区别  http://stackoverflow.com/search?page=1&tab=votes&q=dapper
3.扩展Dapper : https://github.com/tmsmith/Dapper-Extensions or Dapper.Rainbow VS Dapper.Contrib

影响执行计划

Ansi Strings and varchar

Dapper supports varchar params, if you are executing a where clause on a varchar column using a param be sure to pass it in this way:

Query<Thing>("select * from Thing where Name = @Name", new {Name = new DbString { Value = "abcde", IsFixedLength = true, Length = 10, IsAnsi = true });

List Support

Dapper allow you to pass in IEnumerable and will automatically parameterize your query.

For example:

connection.Query<int>("select * from (select 1 as Id union all select 2 union all select 3) as X where Id in @Ids", new { Ids = new int[] { 1, 2, 3 });

Will be translated to:

select * from (select 1 as Id union all select 2 union all select 3) as X where Id in (@Ids1, @Ids2, @Ids3)" // @Ids1 = 1 , @Ids2 = 2 , @Ids2 = 3
_db.Query<Users>("SELECT * FROM dbo.Users  WHERE id IN @ids ",new { ids = IDs.ToArray()}).ToList();

Refer:
Dapper.Rainbow VS Dapper.Contrib
http://stackoverflow.com/questions/10030285/dapper-rainbow-vs-dapper-contrib
Using Dapper QueryMultiple in Oracle
http://stackoverflow.com/questions/18772781/using-dapper-querymultiple-in-oracle
SELECT * FROM X WHERE id IN (…) with Dapper ORM
http://stackoverflow.com/questions/8388093/select-from-x-where-id-in-with-dapper-orm
扩展Dapper
https://github.com/tmsmith/Dapper-Extensions
Any Question
http://stackoverflow.com/search?page=1&tab=votes&q=dapper

最新文章

  1. STM32学习笔记(五) USART异步串行口输入输出(轮询模式)
  2. mysql insert一条记录后怎样返回创建记录的主键id,last_insert_id(),selectkey
  3. CDN的原理以及其中的一些技术
  4. JS 去除字符串中的空格
  5. AutoGenSystem
  6. iOS之NSURLSessionDownloadTask下载
  7. FZU 2129 子序列个数 (动态规划)
  8. OSG消锯齿
  9. C#打开php链接传参然后接收返回值
  10. 201521123063 《Java程序设计》 第8周学习总结
  11. Linux显示系统的诊断信息
  12. Codeforces Round #419 Div. 1
  13. ActiveMQ 事务和XA
  14. OpenWrt路由器通过LuCI界面实现Guest SSID功能
  15. ubuntu journalctl — 检索 systemd 日志
  16. HDU1423 Greatest Common Increasing Subsequence
  17. 【转】每天一个linux命令(56):netstat命令
  18. MySQL 5.7.17 Group Relication(组复制)搭建手册【转】
  19. linux sort中文失效问题的解决
  20. ZIP压缩格式与RAR压缩格式

热门文章

  1. linux systemctl 常用用法简介
  2. 从晶体管到web浏览器
  3. linux 常用命令(个人记录)
  4. 【MySQL】死锁问题分析
  5. set_error_handler
  6. Windows 8.1常见问题
  7. Ubuntu12搭建nutch1.2+tomcat7+jdk1.6
  8. java基础知识-原码,反码,补码
  9. CocoaPods的使用(一) 安装
  10. zeppelin中运行spark streaming kakfa &amp; 实时可视化