When I try to run, I get this error:
System.Data.SqlClient.SqlException: 'The definition for column 'Column' must include a data type
but I defined the types of variables in the 'business' class
public void import (String TXT_T_NEG, String TXT_ACAO, String TXT_ESPEC_PAPL, String Txt_num_neg, String Id_usr)
{
lista.Add (new business(TXT_T_NEG, TXT_ACAO, TXT_ESPEC_PAPL, Txt_num_neg, Id_usr)
}
public void bulkupdate ()
{
var bulk = new BulkOperations ();
using (TransactionScope trans = new TransactionScope ())
{
using (SqlConnection cone = new SqlConnection (@"Myconnection"))
{
bulk.Setup <business> ()
.ForCollection (lista)
.WithTable ("table")
.AddColumn (x => x.Txt_t_neg)
.AddColumn (x => x.Txt_acao)
.AddColumn (x => x.Txt_espec_papl)
.BulkUpdate ()
.MatchTargetOn (x => x.Txt_num_neg)
.MatchTargetOn (x => x.Id_usr)
.Commit (cone);
}
trans.Complete ();
}
}