📜  c# dapper 执行带参数的存储过程 - C# 代码示例

📅  最后修改于: 2022-03-11 14:48:49.986000             🧑  作者: Mango

代码示例1
public void GetSomething(int somethingId)
{
    IRepository repository = UnitOfWork.GetRepository();

    var param = new DynamicParameters();
    param.Add("@somethingId", dbType: DbType.Int32, value:somethingId, direction: ParameterDirection.Input);

    var result = repository.Exec(SomethingEnum.spMyStoredProcedure, param);

    ...

}