csharp Dapper Call StoredProcedure #dapper
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了csharp Dapper Call StoredProcedure #dapper相关的知识,希望对你有一定的参考价值。
/// Dapper Call StoredProcedure
/// https://github.com/StackExchange/Dapper
using (var conn = new SqlConnection (connStr)) {
var res = conn.Query ("dbo.CustOrderHist", new { CustomerID = "Kate" }, commandType : CommandType.StoredProcedure);
foreach (var item in list) {
$"{item.ProductID} {item.ProductName}".Dump();
}
foreach (var item in res) {
Console.WriteLine ("{0} = {1}", item.ProductName, item.Total);
}
}
以上是关于csharp Dapper Call StoredProcedure #dapper的主要内容,如果未能解决你的问题,请参考以下文章
csharp: MySQL Stored Procedure using DAL
csharp Dapper Insert #dapper
csharp [03] Dapper Select类型#dapper
csharp [002] Dapper Select没有#dapper类型
csharp: mappings using Dapper-Extensions+Dapper.net.
csharp Dapper DapperExtension使支持Oracle