Print Page | Close Window

Error converting a property to enum (EF5 + DF2012)

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2012
Forum Discription: For .NET 4.5
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=3734
Printed Date: 26-Apr-2025 at 4:07pm


Topic: Error converting a property to enum (EF5 + DF2012)
Posted By: cefernan
Subject: Error converting a property to enum (EF5 + DF2012)
Date Posted: 23-Oct-2012 at 12:25pm
I'm trying to convert a property to enum via EF Designer. I followed the steps described in: 
http://msdn.microsoft.com/en-us/data/jj248772.aspx - http://msdn.microsoft.com/en-us/data/jj248772.aspx

When I do it in my project, I receive the following error when I save the model:
Error 3 Running transformation: System.ArgumentException: typeUsage
   at IdeaBlade.EntityModel.Edm.Metadata.NamingService.FmtTypeName(TypeUsage typeUsage)
   at IdeaBlade.VisualStudio.OM.CodeGenerator.BaseDomainModelTemplate.FmtPropertyTypeName(EdmPropertyWrapper property)
   at IdeaBlade.VisualStudio.OM.CodeGenerator.BaseDomainModelTemplate.WriteEntityDataPropertyDefinition(EdmPropertyWrapper property)
   at IdeaBlade.VisualStudio.OM.CodeGenerator.BaseDomainModelTemplate.<>c__DisplayClass55.<WriteEntityDataProperty>b__54()
   at IdeaBlade.VisualStudio.OM.CodeGenerator.BaseDomainModelTemplate.WriteRegion(String regionName, Action action)
   at IdeaBlade.VisualStudio.OM.CodeGenerator.BaseDomainModelTemplate.WriteEntityDataProperty(EdmPropertyWrapper property)
   at IdeaBlade.VisualStudio.OM.CodeGenerator.BaseDomainModelTemplate.<>c__DisplayClass52.<WriteEntityDataProperties>b__51()
   at IdeaBlade.VisualStudio.OM.CodeGenerator.BaseDomainModelTemplate.WriteRegion(String regionName, Action action)
   at IdeaBlade.VisualStudio.OM.CodeGenerator.BaseDomainModelTemplate.WriteEntityDataProperties(EntityOrComplexTypeWrapper entityOrComplexType)
   at IdeaBlade.VisualStudio.OM.CodeGenerator.BaseDomainModelTemplate.<>c__DisplayClass41.<WriteEntityClass>b__40()
   at IdeaBlade.VisualStudio.OM.CodeGenerator.BaseDomainModelTemplate.WriteCodeDef(ICodeDef def, Action bodyAction)
   at IdeaBlade.VisualStudio.OM.CodeGenerator.BaseDomainModelTemplate.<>c__DisplayClass41.<WriteEntityClass>b__3f()
   at IdeaBlade.VisualStudio.OM.CodeGenerator.BaseDomainModelTemplate.WriteRegion(String regionName, Action action)
   at IdeaBlade.VisualStudio.OM.CodeGenerator.BaseDomainModelTemplate.WriteEntityClass(EntityOrComplexTypeWrapper entityOrComplexType)
   at IdeaBlade.VisualStudio.OM.CodeGenerator.BaseDomainModelTemplate.WriteEntityClasses(CsdlWrapper csdl)
   at IdeaBlade.VisualStudio.OM.CodeGenerator.BaseDomainModelTemplate.WriteDomainModel(CsdlWrapper csdl)
   at IdeaBlade.VisualStudio.OM.CodeGenerator.BaseDomainModelTemplate.GenerateDomainModel(EdmxWrapper edmx)
   at IdeaBlade.VisualStudio.OM.CodeGenerator.BaseDomainModelTemplate.Generate()
   at Microsoft.VisualStudio.TextTemplating658B6893D562081BC01C77E3BF511F814371987403A2727887BD032849A3FB190EDFF090A35CBF74001D5C029C780425DAC42CC4FDC9CBA3DE3364489BE98EEE.GeneratedTextTransformation.TransformText() in d:\GIT\.Net\Projects\Crmall 4.0\Source\DomainModel\CrmallModel.edmx.tt:line 16 d:\GIT\.Net\Projects\Crmall 4.0\Source\DomainModel\CrmallModel.edmx.tt 16 1 DomainModel (DomainModel\DomainModel)

Just to certify, I've created a new project without DevForce (just EF5) and executed the same steps. It worked perfectly.

Am I missing something?

Thanks.



Replies:
Posted By: kimj
Date Posted: 23-Oct-2012 at 1:21pm
No, you're not missing anything.  We don't support enums in DF2012 just yet. 


Posted By: cefernan
Date Posted: 24-Oct-2012 at 4:24am
Ok. Will it be released in the official version?


Posted By: kimj
Date Posted: 24-Oct-2012 at 9:20am
Unfortunately we won't have enum support in the RTW, but should before the end of this year.


Posted By: cefernan
Date Posted: 31-Oct-2012 at 8:47am
Ok, thanks Kim!


Posted By: cefernan
Date Posted: 04-Dec-2012 at 9:09am
Hello,

Do you have any news about "Enum support"?


Posted By: kimj
Date Posted: 04-Dec-2012 at 9:12am
Enums are supported in the current bits we're now testing.  We don't yet have a release date, but it should be later this month.


Posted By: cefernan
Date Posted: 04-Dec-2012 at 9:25am
Nice, thanks Kim.


Posted By: cefernan
Date Posted: 20-Dec-2012 at 11:39am
Today I updated DevForce to 7.0.3 and now, I will enjoy Enum Support :)



Print Page | Close Window