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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T09:54:45+00:00 2026-06-08T09:54:45+00:00

To reduce amount of data coming from WCF Data Services I use a projection

  • 0

To reduce amount of data coming from WCF Data Services I use a projection technique.

Linq query looked like:

...
    _ctx.Files.Select(x => new FileProjection() { Id=x.Id, Name = x.Name });
...

[DataServiceKey("Id")]
public class FileProjection : ViewModelBase
{
    private string _name;

    public Guid Id { get; set; }
    public string Name
    {
        get { return _name; }
        set
        {
            _name = value;
            NotifyOfPropertyChange(() => Name);
        }
    }

    public string MyCustomProperty { get; set; }
}

FileProjection class has an additional property that doesn’t exist in File entity model.

It works fine while getting the data. But If I tried to update Name I got an exception inside SaveChanges:

Additional information: The property ‘MyCustomProperty’ does not exist
on type ‘DataAccessLayer.Context.File’. Make sure to only use property
names that are defined by the type.

Is there a way to ignore MyCustomProperty during SaveChanges?

Or XXXProjection class shouldn’t have any custom public properties?

The client is Silverlight app, WCF Data Services v5.0.1, oData v3

  • 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-08T09:54:47+00:00Added an answer on June 8, 2026 at 9:54 am

    Currently the only way to do this is to make the property internal or private. All public properties will be serialized and the server will then fail if it doesn’t recognize it.

    Or you can use a workaround by Phani: http://blogs.msdn.com/b/phaniraj/archive/2008/12/11/customizing-serialization-of-entities-in-the-ado-net-data-services-client-library.aspx.

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

Sidebar

Related Questions

In order to reduce the amount of data being retrieved from my server by
I am attempting to reduce the amount of signals I have to use in
Our clients upload a serious amount of data from all over the world and
I have a massive amount of input data (that's why I use Hadoop) and
just wondering if there is a way to reduce the amount of code needed
We all know that CSS sprite images are great to reduce the amount of
Is there any way to combine all of this to reduce the amount of
I would like to reduce the following boiler plate code, BUT without using lenses
I have a large data structure that is using striping to reduce lock contention.
my C# application reads data from special USB device. The data are read as

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.