Can EF4 support batch updates?

前端 未结 3 736
一生所求
一生所求 2021-01-01 22:58

Does Entity Framework v4 support batch updates/inserts so rather than sending >1 command to a db, it can send >1 command to the DB in one go?

Thanks

3条回答
  •  死守一世寂寞
    2021-01-01 23:43

    I believe that can be accomplished by adding multiple Entity to the context and calling save changes.

    context.ApplyChanges("Order", obj1);
    context.ApplyChanges("Order", obj2);
    context.SaveChanges();
    

提交回复
热议问题