|
I get the following exception during application start up.
Type 'DateRangeObject' cannot be serialized. Consider marking it with the DataContractAttribute attribute, and marking all of its members you want serialized with the DataMemberAttribute attribute. If the type is a collection, consider marking it with the CollectionDataContractAttribute. See the Microsoft .NET Framework documentation for other supported types
This is occurring when trying to load the Metadata from the .ibmmx file. It is throwing the exception in a function called SerializationFns.RestoreDCS(...).
Do I have to annotate my classes with the [DataContract] attribute in Code First? I thought the [ProvideEntityAspect] generated the appropriate serialization code. Do you also have to annotate with the other attributes as well? [Binding] [Display] etc?
BTW it appears that DateRangeObject class is not the serialization file but is passed to the DataContract serializer as a KnownType.
Not sure if this helps but DateRangeObject is an abstract class.
Thanks for any help, Sandy
|