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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T23:32:28+00:00 2026-05-10T23:32:28+00:00

Is there an EF equivalent to LINQ to SQL’s OnCreated partial? Several of my

  • 0

Is there an EF equivalent to LINQ to SQL’s OnCreated partial?

Several of my objects have XML fields that I would like to parse whenever the object is loaded from the db – I’d like to put the XML data into more friendly strongly-typed collections. I’ve already marked the XML field as private and hooked the SavingChanges event to re-build the XML before the item is committed back to the db, but I can’t figure out how to populate the collections whenever the object is loaded.

I’ve thought of using the OnFieldChanged partial for my XML field, but that would run again whenever the XML field is re-built during SavingChanges, so it seems like there should be a better way.

  • 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. 2026-05-10T23:32:29+00:00Added an answer on May 10, 2026 at 11:32 pm

    There is no OnLoaded event or similar as far as I know. A workaround might be to expose the collections as properties and lazily create/parse the values on first access:

    private List<SomeData> _parsedDataCache; public IList<SomeData> ParsedData {     get {         if (_parsedDataCache == null)             ParseData();         return _parsedDataCache;     } } 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 66k
  • Answers 66k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer What you're looking for the is the ControllerActionInvoker. You'll have… May 11, 2026 at 11:30 am
  • added an answer There is a formal rule - the C++ Standard (section… May 11, 2026 at 11:30 am
  • added an answer There are a few big benefits to using a framework… May 11, 2026 at 11:29 am

Related Questions

Is there an EF equivalent to LINQ to SQL's OnCreated partial? Several of my
Is there an English equivalent to the French expression: “il faut d’abord apprendre à marcher avant de courir”?
Is there an official convention for naming private fields in VB.NET? For example, if
Is there an automatic way in SQL Server 2005 to create a database from
Is there an efficient method of converting an integer into the written numbers, for
Is there an existing application or library in Java which will allow me to
Is there an equivalent for Interlocked.Exchange for boolean? Such as an atomic exchange of
Is there an easy way to iterate over an associative array of this structure
Is there an easy way in C# to create Ordinals for a number? For
Is there an FTP browser hiding away in NetBeans 6.1? The help manual doesn't

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.