I know I can insert multiple entities using AddRange() and it will only make one trip to the database. In my case I'm inserting a single entity which has, for instance, 15 child entities. In this case Mini Profiler says I'm doing 15 duplicate queries, which afaik means that it takes 15 database trips no insert the child entities.
Question is - how can I bulk insert N child entities in one go? The amount of data in entities is incredibly small (few lines of text).
Aucun commentaire:
Enregistrer un commentaire