Entity Framework 4.1 DbSet Reload

前端 未结 4 1552
抹茶落季
抹茶落季 2020-12-03 11:49

I\'m using a single instance of DbContext scenario to shadow entire copy of the database locally in a WPF app. I\'ve heard this is bad practice, but my database

4条回答
  •  时光取名叫无心
    2020-12-03 12:08

    DbContexts are supposed to live short time, Consider after saving changes disposing it and reloading all from the start. Have 2 sets of objects.. one from db and another for binding.

提交回复
热议问题