i just started discovering serviceStack ORMlite , and i am trying to figure out how to do batch inserts. Are there any example of this anywhere ?
Thanks in advance
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.
There’s currently no built-in support take take advantage of custom RDBMS’s support for this feature. E.g. MySQL’s Batch Insert support.
The
InsertandInsertAllmethods in OrmLite do already accept multiple entities, but they’re executed individually.Depending on the database (that support batch insert via SQL) you can execute custom arbitrary SQL by using
IDbCommand.ExecuteSqlmethod.