logo
  • 教程列表
  • SO官方文档
  • 使用异步
    • 调用存储过程
    • 调用存储过程并忽略结果
  1. StackOverflow 文档
  2. Dapper.NET 教程
  3. 使用异步
  4. 调用存储过程

调用存储过程

Created: November-22, 2018

public async Task<Product> GetProductAsync(string productId)
{
    using (_db)
    {
        return await _db.QueryFirstOrDefaultAsync<Product>("usp_GetProduct", new { id = productId },
            commandType: CommandType.StoredProcedure);
    }
}
  • 调用存储过程并忽略结果
  • 使用异步

Copyright © 2018. All right reserved

tastones.com 备案号:鲁ICP备18045372号-1

  • 关于我们
  • 免责声明