Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to emulate missing property in object
Message
From
13/05/2007 09:24:37
 
 
To
All
General information
Forum:
ASP.NET
Category:
Class design
Title:
How to emulate missing property in object
Environment versions
Environment:
C# 2.0
Miscellaneous
Thread ID:
01225060
Message ID:
01225060
Views:
59
I'm implementing entity object which should populate its properties from
database when property is first referenced.

In RDL reports I use object properties like

MyObject.MyProperty

MyObject is instance of entity class. There is no MyProperty property in MyObject at design time.

I need to catch missing object reference and provide object value at run time. Something line

public class MyEntity {
override Exception Exception.MissingPropertyGetException {
return dbo.ExecuteScalar("SELECT "+Exception.UnreferencedPropertyName+
" FROM myEntity");
}
}
Andrus
Reply
Map
View

Click here to load this message in the networking platform