mardi 25 août 2015

EntityFramework for multi-form winforms desktop app

I am developing desktop app based on winforms and EF. At the moment I have some problems with EF and architecture:

  1. Syncronizing data. There are multiple forms and each form uses it's own instance of Database Context. When data is updated on one form I need manually update it on other forms. There are a lot of non-flexible callbacks and copy-paste that refresh data.
  2. There are some calculations that running on client side and update a lot of records. Sometime user need to save it and with EF it takes long time. So, it is also running in separate Context so that work with other entities is not blocked
  3. There are DataGridViews with Binding entities and there are annoying problems with DbSet.Local and DbSet.ToList(). When data in gridview is saved it is sometimes is not updated in other places.

I am looking for any best practices and flexible patterns that can be used there. Also, looking forward to hear from those who solved same problems.

Thanks

Aucun commentaire:

Enregistrer un commentaire