views:

235

answers:

1

I have something that looks like this

foreach (var user in NewUsers)
            {
                var dbUser = new User {FirstName = user.FirstName};
                dbUser.Save();
            }

That is too many inserts into the database. Can I do something like?

User.BulkInsert(NewUsers);

Thanks.

+3  A: 

Check out the Batch Query - this should solve the issue http://www.subsonicproject.com/docs/BatchQuery

Rob Conery