* Dapper [#u8e246a9]
var dsn = "Server=server01;Port=5432;User Id=taro;Password=123;Database=mydb";
using (var cn = new NpgsqlConnection(dsn)) {
cn.Open();
var all = cn.Query(@"SELECT * FROM t2");
foreach (var row in all) {
Console.WriteLine("ID:{0}, TM:{1}", row.id, row.tm.ToString("yyyy-mm-ddTHH:mm:ss"));
}
}
Console.ReadLine();
** 参考 [#fe2d33af]
- オフィシャル http://code.google.com/p/dapper-dot-net/
-- テストコード https://github.com/SamSaffron/dapper-dot-net/blob/master/Tests/Tests.cs
- http://kiyokura.hateblo.jp/entry/20131014/p1
-- http://www.slideshare.net/kiyokura/adonetormmicro-orm-dapper-dot-net