Print Page | Close Window


Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2009
Forum Discription: For .NET 3.5
Printed Date: 19-Jan-2021 at 3:53pm

Topic: EntityPropertyDescriptors
Posted By: kosgia
Subject: EntityPropertyDescriptors
Date Posted: 25-May-2010 at 1:08am
Hi, i am using DevForce Object Mapper V5.2.6.0
Class EntityPropertyDescriptors is not generated by the object mapper.
In developer's guide 2009 i read the following:

EntityPropertyDescriptors are useful in databinding associated with Winform user interfaces. Their generation is

optional in DevForce WinClient Object Mapper, and should be turned off (as unnecessary) if you are not using

Winforms in your UI.

How can i turn on or off the generation of EntityPropertyDescriptors class?

Posted By: IdeaBlade
Date Posted: 26-May-2010 at 11:05am
At some point we retired them altogether in DF2009. What is it you were trying to do?

Posted By: kosgia
Date Posted: 26-May-2010 at 12:16pm

Well, i would like to avoid hard coding paths like "HomeAddress.State.Name" in some cases like DataBinding as described in Developers guide. Is there an alternative for doing this, a way to get nested property paths strings? Anyway, that's not a big issue. I just thought that something might be wrong with my installation and code generation as i have installed DevForce in Windows 7(64 bit).


Posted By: GregD
Date Posted: 26-May-2010 at 2:31pm


gets you the string name of the Customer.CompanyName property.

Posted By: kosgia
Date Posted: 27-May-2010 at 8:01am
That is fine with one level nested property paths. In case of more than one level like :
can the same be acomplished?

Posted By: GregD
Date Posted: 28-May-2010 at 11:31am
If you want the string name of the Name property of the State entity, use


Nesting doesn't enter the picture: the string name of State.Name is the same no matter what the State entity's relationship is to something else.

Posted By: kosgia
Date Posted: 31-May-2010 at 2:23am

Sorry Greg, I didnít mean getting just the string State.Name but the whole path string like: "HomeAddress.State".

For example if we had an employee object and we wanted to bind the state of his home address with a ui control we would use "HomeAddress.State"as a binding expression. I got this from developers guide: 

Nested Properties Text book examples always show binding to simple object properties like

FirstName. What about an Employee.Address.State.Abbreviation? You donít

see that one often Ė for good reason. It doesnít work.

Oh, it works some of the time. But never in grids, and the breakdowns are difficult

to predict.

The DevForce WinClient DataBinding collections take care of this important


In such cases I think the EntityPropertyDescriptors would get the whole string path of a nested property path, not just the property name. But as I said not a big issue. I', sure you had your reasons for discontinuing these classes.

Posted By: GregD
Date Posted: 01-Jun-2010 at 8:36pm
The EntityPropertyDescriptors never gave you more than you get via <propname>EntityProperty.Name.  If you want the string for the nested property


of an OrderDetail entity, you'll have to build it up, e.g:

    OrderDetail.OrderEntityProperty.Name + "." + Order.CustomerEntityProperty.Name + "." +

Posted By: kosgia
Date Posted: 02-Jun-2010 at 3:07am

Thank you Greg.

I will do that.

Print Page | Close Window