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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T13:10:06+00:00 2026-05-13T13:10:06+00:00

Silverlight is great, and with RIA services solves alot of stuff BUT. Why are

  • 0

Silverlight is great, and with RIA services solves alot of stuff BUT.

Why are we forced to have get; set on every model?

I have been learned that if we have an Customer and the Customer Id should never change, then the Id property should be readonly, if the customer has an password that need to go through some logic before it shall be set the property should be readonly so noone can use my object in a wrong way.

And one of the biggest things we should almost never allow get; set on collections on for example invoice.Rows because it could create bugs hard to find. Maybe I want to block the invoice.Rows.Add (that by the way breaks Law of Demeter principle) method because I want to do some checking within an method invoice.AddRow(row); before adding the row.

Sometimes we want to solve this at the serverside for examplesending the row for the invoice over the service when its being added, but sometimes we want to build the whole invoice at the client and then send it over. I do not wanna need to ask the service hey I’ve just added this row can I get the recalculated totalprice with vat and without vat and so on.

Am I’m the only one who feels lost, or are my aiming and goals wrong, should’t we use silverlight with object oriented thoughts?

  • 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-13T13:10:07+00:00Added an answer on May 13, 2026 at 1:10 pm

    The need for the getter stems from serialization – you want to be able to set during deserialization.

    You also want to be able to set the ID for a new entity, if your IDs aren’t auto-generated.

    As for Order/OrderDetail, in general we expect Order/OrderDetail represents a compositional scenario – you either insert an order with details, or update an order to add/delete/update order details. So if you want to do validation that spans the whole graph, you can attach a validation rule to either Order, or to methods like InsertOrder, UpdateOrder.

    As for recalculating total price etc. you can certainly do that on the client – for example, listen to collection change notifications on the Details collection, and recompute the Total property of Order. The code to enumerate Details and do the aggregation can in fact be shared across client and server so you aren’t duplicating computation logic.

    Hope that helps.

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

Sidebar

Related Questions

Our Silverlight 4 / WCF RIA Services application uses windows authentication, but for one
I have a Silverlight site with wcf ria services, this is just a test.
I have a Silverlight app that uses actions to get data from the model
I have seen some great examples of using behaviours to trigger animations in Silverlight.
I am using wcf ria services in a silverlight application. I am looking at
I am working with the Silverlight RIA Services and I want to create custom
I have found a great silverlight upload control here: http://silverlightuploader.codeplex.com/ If a zip file
I've got a Silverlight 4 RIA Services (SP1) app using Entity Frameworks 4 CTP5.
Is there any way to prevent Silverlight/RIA Services from converting a datetime object on
Silverlight does not provide perfmon counters for GC. How do i get GC Information?

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.