[英]The method or operation is not implemented exception in Script Notify for webview in windows runtime apps c#
[英]C# Dapper QueryFirstOrDefault method with “The method or operation is not implemented” exception
我有一個靜態方法
public static DataRow query_result_to_DataRow()
{
DataTable _dt = null;
using (IDbConnection dbConn = dkCommon.dbConn)
{
dbConn.Open();
try
{
_dt = dbConn.QueryFirstOrDefault<DataTable>("select * from tbl_dk_users where user_name like 'admin' and user_pass like '123456'");
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
DataRow _dr = _dt.Rows[0];
return _dr;
}
我在代碼中有異常“未實現方法或操作”的異常
_dt = dbConn.QueryFirstOrDefault<DataTable>(_query, null, null, 600000, null);
精巧的QueryFirstOrDefault方法無法返回任何數據。 我不知道我在哪里...
嘗試使用Dapper檢索DataTable
是對Dapper的錯誤使用。 如果您希望檢索一個DataTable
,則根本不需要使用Dapper:
DataTable _dt = new DataTable();
_dt.Load(dbConn.ExecuteReader("select * from tbl_dk_users where user_name like 'admin' and user_pass like '123456'"));
您正在使用哪個版本的dapper? 您可能要降級到3.5? 或確保您在整個解決方案中僅使用1個版本的dapper
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.