In the Entity Developer I have added external enumerations (base type is "int") from another assembly. And in some classes/tables I have changed a property to be of the enum type that I have added to the data model. The model shows no errors and builds in my Visual Studio 2012 project.
In my source code I create a context and call context.CreateDatabase(). After this if I try to add any objects, something.AddObject(...), to the context an exception is thrown with the following message:
Where "TrafficBase.CardinalDirection" is the external enumeration type that I added previously.The property 'Orientation' on type 'TrafficDataModel.DataCollection' is attributed with EdmScalarPropertyAttribute but returns the type 'TrafficBase.CardinalDirection', which is not a primitive type or a recognized enumeration type.
If I remove the "EdmScalarPropertyAttribute" attribute from the generated Designer code for the enumeration type properties it seems to work. However, I later run into another error when trying access any object collections on my context that have the enumeration type property in their elements.
Is there something I am missing for adding existing enumerations to my Data Model? Also I am using dotConnect for SQLite if it matters, Entity Framework 5, .NET 4.5.Message=The number of members in the conceptual type 'TrafficDataModel.DataCollection' does not match with the number of members on the object side type 'TrafficDataModel.DataCollection'. Make sure the number of members are the same.
Thank you for your time!