NHibernate Performances : batch insert or update

31. May 2010
An ADO.NET DbCommand's property named : ArrayBindCount is useful to operate "bulk" insert or updates. It means you can add or update several rows with only one query. You can imagine that the target query will looks like this : CommandText (for Oracle) = “INSERT INTO CONTACT (ref, name) VALUES (:RefsParam, :NamesParam)” With 2 parameters passed to the .NET DB Provider Array of Int : [1, 2, 3, 4, …] for the references (RefsParam) Array of String : ['Robert', 'Daniel', 'Stephan', 'Pierre-Antoine'...]  for the names (NamesParam) The goal is to insert the following rows : 1, 'Robert' 2, 'Daniel' 3, 'Stephan' 4, 'Pierre-Antoine' ... As you are using NHibernate, the question is : How do I set NH to u... [More]