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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T19:57:22+00:00 2026-05-23T19:57:22+00:00

Can someone clarify my thinking on association fixup code in Entity Framework (T4 generated

  • 0

Can someone clarify my thinking on association fixup code in Entity Framework (T4 generated POCOs) please?

A recent comment regarding fix-up stated ‘For example code-first doesn’t use them and everything still works’.

I’m a little confused on this fixup stuff – seems no-one likes it – I certainly don’t like it polluting my POCOs (though my reason is because of performance issues) yet it is not clear to me in what scenarios would I really need it.

If I am using short-lived data context lifetimes i.e. new context for each page request (UoW) in an ASP.NET application, then should I worry at all if I were to rip out all the association fix-up code from the T4 template (finally nice clean POCOs)?

EDIT

I found this discussion on MSDN ‘Fixup Goes Crazy’ which does provide some clarification: http://social.msdn.microsoft.com/Forums/pl-PL/adodotnetentityframework/thread/a757d1fb-1339-422e-a03a-2b90ce4cd692

  • 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-23T19:57:24+00:00Added an answer on May 23, 2026 at 7:57 pm

    Fix up is just a code generated by T4 template. EF doesn’t need it at all and EF doesn’t use it. It was some assumption done by ADO.NET team that POCOs should be clever and fix their navigation properties if you change it on one side. If you write your entities manually instead of using T4 template and you will omit all fix up logic it will still work. That is also the reason why you don’t need fix ups in the code first.

    You can modify your T4 template and remove all fix up logic.

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

Sidebar

Related Questions

Can someone please clarify using a SIMPLE user story the full slice of what
Please can someone clarify something which I should really know by now? If I
I am confused can someone clarify what is .NET Framework means? Is that an
I'm hoping someone can clarify this behavior for me, and explain how ASP.NET is
Can someone clarify - if in my activity, I leave to call an intent
In the context of data-structures synchronization, can someone clarify the difference between lockless and
Can someone clarify if URN, URI, and URL encoding are all infact the same
Can someone clarify that the role of a ClassLoader is not only to load
Can someone clarify why ruby returns such big numbers when using to_r for example:
Can someone clarify about cloud computing a bit? For example with Amazon Ec2 and

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.