Answers for "c# dapper execute stored procedure with parameters"

C#
0

c# dapper execute stored procedure with parameters

public void GetSomething(int somethingId)
{
    IRepository<Something, SomethingEnum> repository = UnitOfWork.GetRepository<Something, SomethingEnum>();

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

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

    ...

}
Posted by: Guest on March-05-2020

Code answers related to "c# dapper execute stored procedure with parameters"

C# Answers by Framework

Browse Popular Code Answers by Language