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 9205475
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T23:57:30+00:00 2026-06-17T23:57:30+00:00

I have two table A,B , their relationship is 1 to 1, i have

  • 0

I have two table A,B , their relationship is 1 to 1, i have a method to get the info of A,

and there is a property B in the entity A, but after i user the method detach(A), found

the property B of entity A is null, i just want to return a detached entity to client side.

could you help me how to get a detached entity A contains property B?

Code snip

var a = Context.A.Include('B').Where(i.id=1) //the property B of entity a is not null
Context.Detach(a) ;// after executing this method the property B of entity a is null
  • 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-06-17T23:57:31+00:00Added an answer on June 17, 2026 at 11:57 pm

    According to Daniel Simmons @ http://social.msdn.microsoft.com/Forums/pl/adodotnetentityframework/thread/6c0aa93e-7fdf-475c-86ea-d5caac918329:

    Detaching graphs is a big pain in the rear. Frankly, unless your graph is very shallow, I wouldn’t even try it. You have to take the graph apart from the bottom up and then reattach the entities in memory. Microsoft has not provided a pattern for us to do this and they aren’t giving us a method for it in the next version.

    Alternatively, have a look at this answer which might help you, or alternatively that one.

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

Sidebar

Related Questions

I have two tables with a linking table describing their many-to-many relationship. TABLE buildings
I have two table views, when user clicks one cell of the first, second
If I have a relationship between two tables (both tables have their own primary
I hav two models, User and Account, they have a many-to-many relationship through AccountUsers.
I have two tables with parent - child relationship: PARENT table with id as
I have two tables: Person(personID, name, phone, email); Relation(child_personID, parent_playerID); The relationship table helps
I have two tables and their only difference is one column is missing from
I have two tables- users and language with a foreign key link of their
I have been trying to join two tables (USERS AND USERS_ROLES) based on their
I have two table cells, with dynamic content. Table cell one works fine, when

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.