Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

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);

    ...

}
Comment

PREVIOUS NEXT
Code Example
Csharp :: c# double 
Csharp :: symfony debug bar 
Csharp :: how to lerp a value in unity 
Csharp :: unity unit testing 
Csharp :: what are delegates and how to use them c# 
Csharp :: how to auto format c# code in visual studio 
Csharp :: entity 
Csharp :: send email every 5 minutes c# 
Csharp :: Entity framwork update parent entity added new sub entity 
Csharp :: .net core web api save pdf file in local folder 
Csharp :: unity color mix 
Csharp :: How to build a rest component with very long process 
Csharp :: c# bool? to bool 
Csharp :: dynamics 365 create record c# 
Csharp :: degree between two points latitude longitude c# 
Csharp :: c# linq sorting sequential guids 
Csharp :: user (current login user) in viewcomponent 
Csharp :: join where order by .net framework 
Csharp :: c# param exception 
Csharp :: delegate 
Csharp :: blazor wasm roles not working 
Csharp :: how to declare variables in c# 
Csharp :: Click an HTML link inside a WebBrowser Control 
Csharp :: vb.net delete line from text file 
Csharp :: best unity regex for email validation in c# 
Csharp :: virtual list entity framework 
Csharp :: c# regex double of some letters only 
Csharp :: #StopRape 
Csharp :: c# user and password verification 
Csharp :: unity generate random offset position around a gameobject 
ADD CONTENT
Topic
Content
Source link
Name
2+5 =