Entity Framework 4.1 DbSet Reload

前端 未结 4 1557
抹茶落季
抹茶落季 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:26

    Please use using() for CRUD.It will automatically reload the updated data.

    using (myDbContext context = new myDbContext())
    {
    
    }
    

    Best Regards, Thet Tin Oo

提交回复
热议问题