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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T07:03:34+00:00 2026-05-31T07:03:34+00:00

I must be doing something really wrong as this seems like a very simple

  • 0

I must be doing something really wrong as this seems like a very simple extension that causes an error when you try to compile the code.

So…we have a Customer Table and in that table we have a Customer_ID. We only store the Customer ID and the rest of the data comes from a Customer Truth Center.

This Customer table is referenced and creates a Entity Customer object when we generate our entity EDMX file.

We take this Customer ID and fetch the rest of the Customer info from a WCF service thats our Customer truth center. This returns the Name, Age and such.

So…we want to extend the existing Customer entity with these additional properties however we done “persist” these in our Customer database.

Hence we created a Partial Class to extend our Entity Customer like this:

namespace UsingRIAServices.Web.Models
{
    public partial class Customer
    {

        public string Name { get; set;}
        public int Age { get; set;}
    }
}

This didnt work and when you build you get the following error.

Entity “UsingRIAServices.Web.Models.Customer’ has a property ‘CustomerReference’ with an supported type.

So…if you go into the Customer.Designer.cs you see this propery

/// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [BrowsableAttribute(false)]
    [DataMemberAttribute()]
    public EntityReference<Customer> CustomerReference
    {
          blah, blah
    }

And note the type Customer in the EntityReference which is now an extended class with our partial.

So…I added [Datamember] to each item in our partial class…same error. I tried to [Exclude] it and get the same error.

Why is something that seems so simple and direct so difficult. Please help us figure out how to extend an entity partial class. Can you do this with data that is not in the table?

Thanks

  • 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-31T07:03:36+00:00Added an answer on May 31, 2026 at 7:03 am

    The trick is to add your class to the Models\Shared folder of your web project and name your class Customer.shared.cs.

    You then get rid of all of the using statements from your new class and add the “partial” keyword to the new class. For example:

    namespace XXXX.Web
    {
    public partial class Customer
    {
    public string FullName
    {
    get
    {
    return FirstName + ” ” + LastName;
    }
    }
    }
    }

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

Sidebar

Related Questions

I find this very strange, must be something I'm doing wrong, but still... I'm
I must be doing something really wrong, but I can't find anything on this
I must be doing something wrong here (because really, what are the chances of
I feel like I must be doing something really stupid. What can I do
I'm really confused. I want to do something that a) seems like it should
I must be doing something really obviously wrong, but I can't see it.
I'm trying out my first Spring project and must be doing something really stupid
I must be doing something wrong. I can't seem to execute my CustomValidator's ServerValidate
I'm sure I must be doing something wrong. But can't for the life of
I have found out that I am doing WPF wrong and frustratingly must overhaul

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.