CSLA 3.5+: Do managed properties actually have to have an implemented Property?

CSLA 3.5+: Do managed properties actually have to have an implemented Property?

Old forum URL: forums.lhotka.net/forums/t/5734.aspx


rsbaker0 posted on Wednesday, November 05, 2008

It may seem like a strange question, but some of our objects have a dynamic component where the user can add custom fields to our schema.

Obviously, these aren't known at compile time and I'm currently implementing my own infrastructure to support them (and I expose them via ICustomTypeDescriptor, but will be switching over to ITypedList).

If I could just register these with CSLA instead, I could eliminate my own dynamic field tracking mechanism.

I'd think the answer would be, yes this is OK, but just wanted verification that this was considered a legitimate thing to do.

RockfordLhotka replied on Wednesday, November 05, 2008

I think you should be able to use the field manager and field registration to simplify the implementation of a dynamically shaped type, yes.

Inside your business class (or base class) you should be able to interact with the field manager to get a list of registered properties, which you could then expose through your interface (ITypedList, etc) in the expected format.

Copyright (c) Marimer LLC