Simple question: can NHibernate save a collection without an iterator? For example:
var list = new List<Item>();
list.Add(1000 items);
session.Save(list);
Or do I have to do foreach over the list?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Simple question – simple answer. AFAIK no – you have to iterate. In fact it is faster if you keep flushing and clearing the session time after time like it is told in the NHibernate Docs about batch processing: