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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T20:59:12+00:00 2026-05-15T20:59:12+00:00

In our Smartclient app we currently use PostSharp to inject get/set code into auto

  • 0

In our Smartclient app we currently use PostSharp to inject get/set code into auto properties to implement Dirty state tracking and INotifyPropertyChanged events.

We often use these business objects with LinqToSql. We’d like to remove this dependency on Postsharp, and the .Net 4.0 ExpandoObject looks perfect. We can add dynamic properties and add custom get/set code without having to repeat it on every property for the HasChanged() implementation.

My question is this; How do we get instances of dynamic ExpandoObject from LinqToSql? Is it at all possible?

If not, is there some other way this can be achieved? we basically have business objects with 50-100 properties on each, and need to implement INotifyPropertyChanged without hundreds of lines of repetitious code

  • 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-15T20:59:12+00:00Added an answer on May 15, 2026 at 8:59 pm

    It looks like for now there are three ways to go about this

    1. Proxy objects e.g. Castle Dynamic proxy
    2. Code generation e.g. T4 templates
    3. Code weaving e.g. Postsharp

    Postsharp seems to be a good method for us, since we get the desired behaviour using the defaukt constructor, and don’t have to worry about the maintenance of generated code. We just add an attribute to a POCO entity and just forget about it.

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

Sidebar

Related Questions

Our team is currently using some ported code from an old architecture to a
Our app consumes an API, and its data model has a set of entities
Our Sample Code EditText txtData = (EditText) findViewById(R.id.txtData); Button btnReadSDFile = (Button) findViewById(R.id.btnReadSDFile); btnReadSDFile.setOnClickListener(new
Our web app uses SystemPropertyPlaceholder to load property files depending on the value of
Our PHP application makes use of json_encode($myObject) a lot, in conjunction with the mustache
Our Django project is getting huge. We have hundreds of apps and use a
Our goal is simple for an iPhone app: show a splash page then hide
Our site has a list of games and we get paid everytime someone signs
Our data model is separated into schemas on two databases. The schemas are used
Our company currently offers free sub-domains for redirects to our customers. These are quite

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.