1.以操作SQLite为例.先下载Dapper,项目引用添加Dapper.dll,然后入下
SQLiteConnectionStringBuilder sb = new SQLiteConnectionStringBuilder(); sb.DataSource = @"D:sqlite.db"; SQLiteConnection con = new SQLiteConnection(sb.ToString()); con.Open(); string sql = "select * from user"; foreach( User u in con.Query<User>(sql)) { Console.WriteLine(u.Name); } con.Close();
原文:http://www.cnblogs.com/bqh10086/p/4333359.html
【说明】:本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:254677821)!