How to Pass List<> to Store Proc : I am trying to pass alist to database (sql server 2008 r2) using user defined table types but get some errors my code is:
   public int DAL_SaveIncramentSalary(tbl_Employee_Master obj, List<dtIncrementSalary> tbl)
    {            try            {                SqlParameter[] objSqlParameter = new SqlParameter[4];                objSqlParameter[0] = new SqlParameter("@Company_ID", obj.Company_ID);                objSqlParameter[1] = new SqlParameter("@Employee_ID", obj.Employee_ID);                objSqlParameter[2] = new SqlParameter("@Salary_Month", obj.Govt_DA);
            objSqlParameter[3] = new SqlParameter("@dt", SqlDbType.Structured);                objSqlParameter[3].Value = tbl;                objSqlParameter[3].Direction = ParameterDirection.Input;                DataSet fdd = SqlHelper.ExecuteDataset(_cnnString2, "usp_Insert_Increment_Salary_List", CommandType.StoredProcedure, bjSqlParameter);                DataSet fddd = SqlHelper.ExecuteDataset(_cnnString2, "usp_Insert_Increment_Salary_List", objSqlParameter);                DataSet ds = SqlHelper.ExecuteDataset(_cnnString2, CommandType.StoredProcedure, "usp_Insert_Increment_Salary_List", objSqlParameter);                return SqlHelper.ExecuteNonQuery(_cnnString2, CommandType.StoredProcedure, "usp_Insert_Increment_Salary_List", objSqlParameter);            }            catch (Exception ex)            {                throw new Exception(ex.Message);            }        }    I got error like this:    Dataset dff error : Parameter count does not match Parameter Value count.    DataSet fddd error : ailed to convert parameter value from a List`1 to a IEnumerable`1.    DataSet ds error :Failed to convert parameter value from a List`1 to a IEnumerable`1.
    sql user defined type    CREATE TYPE dtIncrementSalary AS TABLE(Head_Id int null,
SalAmt numeric(18,2) null,    Per float null,    OldSalAmt numeric(18,2) null,    OldPer float null       )    sql proc    alter PROCEDURE [dbo].[usp_Insert_Increment_Salary_List]       (        @Company_ID int,       @Employee_ID int,       @Salary_Month int,     @dt dtIncrementSalary readonly        )        AS    
BEGIN        select * from @dt    END
