问题描述
- Dapper 查询表是否存在的问题 5C
-
internal class Table { public string COUNT { get; set; } }
lock (DbBase.LockDb) { using (DbBase db = new DbBase()) { Table Msg=null; Msg = db.Conn.Query<Table>(""select COUNT(*) from sqlite_master where [type]='table' and [name]=@name"" new { name = ""DBVersion"" }).ToList().FirstOrDefault(); Console.Write(Msg.COUNT); } }
这写的不对嘛?怎么查询为空
解决方案
时间: 2024-12-28 02:51:38