This question is locked. New answers and comments are not allowed.
I'm working on porting an app over to use OpenAccess, and I'm looking for a suggestion on what I should, or should not, do regarding using the same OpenAccessContext in multiple forms. This app has the potential for the user to open several unrelated Windows forms, and switch back and forth between them doing work. Since there is some initialization overhead involved, I was thinking about creating one instance of the OpenAccessContext and having all of these child forms use it. However, I was worried that saving data in one form would cause any updates from the other forms to get pushed out to the database as well. This would be a problem for me since records on one form may not be complete when another is saved. I'm sure I could just create a new OpenAccessContext in each form, but that just seems like it might be excessive. So, I'm looking for some guidance on what is the recommended way of using OpenAccess in a project with multiple windows forms. Mostly, what do I need to do to make sure that the CUD work on one form isn't going to interfere with incomplete work on another form.
Thanks,
- Bret
Thanks,
- Bret