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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T19:28:15+00:00 2026-05-25T19:28:15+00:00

If I have an entity in RIA services like this, [EnableClientAccess] public class ShapeEntity

  • 0

If I have an entity in RIA services like this,

[EnableClientAccess]
public class ShapeEntity
{
    [Key]
    public int Id { get; set; }
    [Association("Shapes", "Id", "Id")]
    [Include()]
    public IEnumerable<SingleShapeEntity> ShapeEntities { get; set; }
}

The problem with the above is that I just want the ShapeEntities to hold information related to the ShapeEntity, but not be its own entity in its own right.

The problem with it being a separate entity is that I add or update something in the ShapeEntities list it calls the insert / update method for the SingleShapeEntity on the server.

I don’t really want this. I would rather it be something like this,

[EnableClientAccess]
public class ShapeEntity
{
    [Key]
    public int Id { get; set; }
    public IEnumerable<SingleShapeEntity> ShapeEntities { get; set; }
}

But what happens when I do this is the ShapeEntities doesn’t end up being compiled into the client side entity.

Another point as to why I want to do this overall is that I need to be able to operate on the ShapeEntities list on the server as a whole, and at the moment the insert / update method gets called on the server with each SingleShapeEntity item one after the other.

  • 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-25T19:28:15+00:00Added an answer on May 25, 2026 at 7:28 pm

    I had to use a work around, I defined an insert method for the SingleShapeMethod on the server which did nothing, like this,

    public void InsertShapeEntity(SingleShapeEntity shapeEntity)
    {
    }
    

    This was called for each SingleShapeEntity that I added to the ShapeEntities enumerable. I didn’t want to deal with them in this method because I need to deal with all of the info at once.

    I then had to define the ShapeEntity like this,

    [EnableClientAccess]
    public class ShapeEntity
    {
        [Key]
        public int Id { get; set; }
        [Association("Shapes", "Id", "Id")]
        [Include()]
        public IEnumerable<SingleShapeEntity> ShapeEntities { get; set; }
        public DateTime Updated { get; set; }
    }
    

    When I updated the ShapeEntities I had to set the Updated field to DateTime.Now so that this would trigger an update method to be called on the server,

    public void UpdateShapeEntity(ShapeEntity entity)
    {
        // handle the new set of ShapeEnties that have been defined as a whole
    }
    

    Without having the Updated field RIA services doesn’t consider the ShapeEntity to have updated and the server update method is not called. When you update the ShapeEntities RIA treats that as an update to the child entities only, not the parent.

    Not the best solution, but it works.

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

Sidebar

Related Questions

I have entity model like this (using EclipseLink and JPA 2.0): @Entity class A
I have read this link :- RIA Services: Entity Framework Reference Entities and added
I have an entity similar to the below: public class Entity { public List<DateItem>
I am using RIA services with Entity Framework- I have the following sql select
I have been experimenting recently with Silverlight, RIA Services, and Entity Framework using .NET
In RIA services the EntityCollection<T> class is defined as follows : public sealed class
This is a basic LINQ question. In my RIA Services Application, I have a
I have a Silverlight application that uses WCF RIA Services. I'd like to be
I've got an application set up with RIA Services, Entity Framework 4, and Silverlight
I have a Silverlight site with wcf ria services, this is just a test.

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.