Is it possible with BLToolKit (http://bltoolkit.net) to create a set of records for list of object (batch insert)?
If yes, how is this possible?
Thanks a lot!
Is it possible with BLToolKit (http://bltoolkit.net) to create a set of records for list of object (batch insert)?
If yes, how is this possible?
Thanks a lot!
using (var db = new DbManager())
{
var ret = (from s in db.tablename
select new ObjectList
{
Id = (int)s.Id,
Name = s.Name
}).ToList();
return ret;
}
using (var db = new DbManager())
{
db.SetSpCommand("Person_Insert")
.ExecuteForEach<Person>(list);
}
Where list
is provided by other means of your application functionality.