Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7046843
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T02:41:56+00:00 2026-05-28T02:41:56+00:00

I am building a MDI application using Entity Framework but I am wondering how

  • 0

I am building a MDI application using Entity Framework but I am wondering how to use the object context accross all the windows.
I planned to use a single context (singleton) accross the application but in my requirements, I must handle undo changes for each window (if the user does not want to save changes). Moreover, everything must be bound, so a change in a window must update the corresponding object in another window.

Since we can have multiple windows, it is difficult to see in the context which entity was modified by which window and undo changes if necessary.
I thought that we could create a local context for each window but then it would be difficult to maintain (and then maybe synchronize this local context with the global one).

Do you have any thought on how to handle the context in such case?

Thank you.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T02:41:56+00:00Added an answer on May 28, 2026 at 2:41 am

    Your requirements simply say that your windows cannot be bound directly to context. You must have intermediary layer doing your application logic like window data synchronization and undo and this layer will communicate with context just to load or persist data. In your case the layer can be called presenter => MVP pattern with single presenter handling multiple windows + probably command pattern for handling undo if you have many types of operations.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Building a python application that converts raw audio files into wave using sox on
Building an app using android.support.v4.app , targeting API level 8. Everything's working as planned
Building my first web app using Yii and wondering if it is best to
Building a multilingual application that should work with the most prevalent global alphabets but
Building a quick view that will display a list of all days but only
Building an application, before using a real database, just to get things work I
Building a client-side swing application what should be notified on a bus (application-wide message
building a site using PHP and MySQL that needs to store a lot of
Building my first SL MVVM application (Silverlight4 RC) and have some issues i don't
Building a new ASP.net application, and planning to separate DB, 'service' tier and Web/UI

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.