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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T10:44:36+00:00 2026-05-15T10:44:36+00:00

Hi I found problem with EF. Here is my Model I loaded asset: POCO.Asset

  • 0

Hi I found problem with EF.

Here is my Model

I loaded asset:

POCO.Asset asset = _context.Assets.Where(a => a.UID == assetUid).First();

then I go through all properties

foreach (POCO.Property p in asset.Properties) /* request to db */ { /*...*/ }

categories:

foreach (POCO.Category p in > asset.Categories) /* request to db */ { /*...*/ }

related assets:

foreach (POCO.Relation relatedAsset in entityAsset.Relations) /* request to db */ { /*...*/ }

all navigation properties work fine. I can see request to db through profile. everything is good.

but if I go through Relations and trying to load RelatedAssetProperties then I have a problem.
Basically my Asset has 4 relations and each relation has 2-3 properties.

foreach (POCO.Relation relatedAsset in entityAsset.Relations) /* request to db */
{
 /**/
 ICollection<RelatedAssetProperty> rap = relatedAsset.RelatedAssetProperties;
 foreach (RelatedAssetProperty relatedAssetProperty in rap)  /* request to db */
 {
  /**/
 }

}

During RelatedAssetProperties execution I see all 4 requests to db to get properties. I run all requests in SQL manager and each returns data.

But for some reason only for first relation rap has items (RelatedAssetProperty). For other Relations it is empty.

And I do not know why.

  • 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-15T10:44:36+00:00Added an answer on May 15, 2026 at 10:44 am

    Can you make sure that your entities have a primary key which makes sense ? I had a similar problem in a view where only the first recordset in the DB was returned.

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

Sidebar

Related Questions

Here is a hum-dinger of a problem that I have not found an answer
problem euler #5 i found the solution but i don't know why this first
I have found many questions here on SO and articles all over the internet
I found a problem with the XML Serialization of C#. The output of the
I have found a problem with use JQuery timeout, i have a page with
A problem I ran into a while back I never found a good solution
Maybe someone found a workaround for the following problem: It seems as if AXIS
In trying to solve the ajax back button problem I have found the Really
How do I let Microsoft know about a problem I've found in one of
I've been struggling with a problem for the past couple days and haven't found

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.