context.Invoices.Add(invoice); // invoice contains all invoice details
context.SaveChanges();
It will use single database connection but each entity will be inserted in separate database roundtrip because EF doesn't support command batching.
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.OkRead more