Answers for "pass datatable to stored procedure c# dapper"

C#
0

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();
    }
}
Posted by: Guest on November-19-2020

Code answers related to "pass datatable to stored procedure c# dapper"

C# Answers by Framework

Browse Popular Code Answers by Language