dapper 最简单操作示例

花门楼前见秋草,岂能贫贱相看老。这篇文章主要讲述dapper 最简单操作示例相关的知识,希望能为你提供帮助。

static string dataConnection = ConfigurationManager.ConnectionStrings["DefaultConnection"].ConnectionString; static IDbConnection connection = new mysqlConnection(dataConnection); public static string GetCode() { using (connection) {
//查询 stringcode = connection.Query< string> ($"SELECT orignal_code FROM `pack_code_oc` ").FirstOrDefault();
//删除 connection.Execute($"deleteFROM `pack_code_oc` where orignal_code=‘{code}‘"); return code; } }

【dapper 最简单操作示例】 



    推荐阅读