|
Hi,
I just tried to set as a name property for a domain class a property with a type different than String (an Integer in this case). When I did it, I got an error stating that I needed an ElementNameProvider to make this work:
Domain Property DomainProperty1 is marked IsName, but has type System.Int32. Unless it has an ElementNameProvider, the type of a Name property should be System.String.
I did create the element name provider, registered it as an external type and set it as the element name provider for this name property; the error was gone, and I could successfully generate the code for the dsl.
When I tried to create an instance of the domain class with this property, I got a different and somewhat contradicting runtime error, stating that:
"ElementNameAttribute is applied to a domain property of type other than System.String".
Are name properties other than strings supported as hinted by the design time error, or the reality is described by the runtime error message? I think it's the latter.
Thanks,
Fernando |