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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T19:06:47+00:00 2026-06-15T19:06:47+00:00

I am using Entity Framework in my dataaccess layer, i also use this as

  • 0

I am using Entity Framework in my dataaccess layer, i also use this as my object model.

psudo object model:

public class Item{
    public string ID{get;set;}
    public string Name{get;set;}
    public Xml Data{get;set;}
}

The Data property is the key here. i would like to be able to do this:

Psudo:

var item = Items.Get(id: 1);
var xmlValue = item["key"];

I would like to be able to extend the EF generated class Item with a new property where i use some logic to get a value by key from the xml.

My problem is:

  1. I find EF data model not very easy to work with and when i want to update the Item table, i cannot be sure my extended logic will stand.
  2. I dont think i want to add an extracted model and do a convert the EF Item to My.Item every time. This will be a heavy opeartion if the table gets big.

What is a good way to extend the EF object model?

that i dont

  • 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-15T19:06:49+00:00Added an answer on June 15, 2026 at 7:06 pm

    You could just use a partial class and define the extra fields / properties.

    Converting from EF Item to your item is trivial if the fields are the same, you could just use Automapper

    i’m leaning towards the partial class solution though.

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

Sidebar

Related Questions

I'm using Entity Framework for creation of my Data Access Layer and I want
(using Entity Framework) when i write : IEnumerable<string> q = customers /*EF entity*/ .Select
Using Entity Framework, I suddenly get this strange error after publishing my asp.net mvc
I'm using the entity framework as my data access layer. But for some tasks
In a web application using Entity Framework 4.1 we use SQL Server Membership to
I am using Entity framework for my DAL (Data Access Layer). We have three
I have a data access layer (DAL) using Entity Framework, and I want to
I'm using the ADO.NET Entity Framework as the data access layer in my application,
What are the pros & cons of using Entity Framework 4.1 Code-first over Model/Database-first
I am using Entity Framework (4.3) migrations. I have a config class as normal

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.