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

  • SEARCH
  • Home
  • 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 7180465
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T17:21:16+00:00 2026-05-28T17:21:16+00:00

I have a form to fill out document A. Document A has associated documents

  • 0

I have a form to fill out document A. Document A has associated documents B and C.
A single context is supposed to be used for a single unit of work – such as filling a document A. BUT! I would like to fill B and C while filling A with option to cancel everything. Is it possible, and if it is – how – to create a context from another context instead of the database.

I create a context for document A, and when user starts creating document B, I want a ‘subcontext’ that save its changes in its ‘parent’ context.

Can I do that? How? Am I doing something wrong?

  • 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-28T17:21:18+00:00Added an answer on May 28, 2026 at 5:21 pm

    No. You cannot create context for context – at least there is no such built-in functionality so you would have to create your new “subcontext” type and whole its logic completely yourselves.

    Simply if you want to work as unit of work use single context. You can use two approaches:

    1. Create document A, B and C with correct references between them and only after that add document A to context and SaveChanges. If user cancels document creation you will simply not add document A to context and never call SaveChanges.
    2. Create document A and add it to context, create document B and add it to context, created document C and add it to context. After that make references between context by setting navigation properties and SaveChanges. If user decides to cancel creation you will dispose current context without ever calling SaveChanges.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

On my site, I have a form that users fill out to become a
I have a form which users must fill out and submit. The controller action
Okay all, I have a form that I want users to fill out. When
I have a big form on my site. When the users fill it out
I have a form that users fill out, and on the form there are
I have a form that a user would fill out while creating a ticket
i have a form that users can fill out and i need the users
Ok here's what happens. I have a form, I fill it out with details,
html form will have questionaire students fill out the questionaire and submit them the
I have a web form that users can fill out and that content fills

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.