Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

pass datatable to stored procedure c# dapper

using (SqlConnection con1 = new SqlConnection(connectionstring))
 {
  using (SqlCommand cmd1 = new SqlCommand("your_procedure_name"))
    {
        cmd1.CommandType = CommandType.StoredProcedure;
        cmd1.Connection = con1;                                               

    SqlParameter Param = cmd1.Parameters.AddWithValue("@parameter_name", dt);
    Param.SqlDbType = SqlDbType.Structured;
        con1.Open();
        cmd1.ExecuteNonQuery();
        con1.Close();
    }
}
Comment

PREVIOUS NEXT
Code Example
Csharp :: how to configure session timeout in asp.net core 
Csharp :: save file dialog filter c# 
Csharp :: c# request run as administrator 
Csharp :: c# read from text documenmt 
Csharp :: delete all dir content c# 
Csharp :: move object to mouse unity 
Csharp :: unity3d random 
Csharp :: unity vscode launch.json 
Csharp :: unity get child 
Csharp :: convert string to array c# 
Csharp :: list of all c# keywords 
Csharp :: conditional blazor styles 
Csharp :: c# read from file 
Csharp :: All SQL Server Tables in a Schema 
Csharp :: c# swap variables 
Csharp :: take screenshot in c# 
Csharp :: string in int c# 
Csharp :: video gets pixelated by scaling it up to Screen Size unity 
Csharp :: c# display float with 2 decimal places 
Csharp :: c# writeline list 
Csharp :: asp.net core identity get user id 
Csharp :: make invisible unity 
Csharp :: c# create file if not exists 
Csharp :: where is c# used 
Csharp :: c# datagridview column size 
Csharp :: Razor foreach loop 
Csharp :: c# list grouping 
Csharp :: how to print dictionary in c# 
Csharp :: c# build string out of list of strings 
Csharp :: what is a protected int c# 
ADD CONTENT
Topic
Content
Source link
Name
9+3 =