标签:
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