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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T17:35:35+00:00 2026-05-13T17:35:35+00:00

Having created a standard Silverlight Business Application in VS2010 and set up a model

  • 0

Having created a standard Silverlight Business Application in VS2010 and set up a model from a SQL Server database, I have various entities and associations, among which AssetGroup and Asset are in a 1:m relationship.

Allegedly I can use dot notation to get the associated AssetGroup out of an asset instance. Through the modern miracles of deferred execution and lazy loading, I am assured, my data will be delivered the very moment that I need it.

But it doesn’t work.

What are the required incantations, and do I have to slay a chicken or a goat?

This looks promising. As soon as I’ve tried it out I’ll update.

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

    In the question I mention a blog post containing a possible solution. That solution works, but entails changes to generated code, which is obviously as fragile as a solution gets.

    Here’s a robust way to apply the solution: change the code generator.

    1. On the EDMX designer surface right-click for the context menu and choose Add Code Generation Items…
    2. Try to improve on “Model1.tt” as a name and save the TT file.
    3. Open the TT file.
    4. Search for “return (” to directly find the method template you need to change.
    5. Edit as shown.
    6. Rebuild the solution.

    Change this

    return /* big hairy expression */;
    

    to this

    var entity = /* big hairy expression */;
    if (!entity.IsLoaded) entity.Load();
    return entity;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created an tab bar application having 3 tab. When I am launching
I have many models created with the standard rails model generator. Some of the
I have two list of different objects : List<Report> List<Newsletter> each having a 'created
So I have an animation that is being created by having a bunch of
I have created an empty json object having an array itemlist(which further contains itemid
I created a blackberry application but I am having problems publishing it on my
Im having trouble working grabbing a dynamically created image from this service: http://opsin.ch.cam.ac.uk/opsin/USER-STRUCTURE-TO-GENERATE.png Im
I have a typical Silverlight application with a WCF service and I am using
I have created a set of custom HtmlHelper extensions. I would like to know
My application has a message-only window that is launched from a newly created thread.

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.