You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 16, 2024. It is now read-only.
I think that it is common for developers to want to name an entity with the same name as part of the project namespace. Ex: I am currently working on a press release application. The project name is PressRelease. My root namespace is PressRelease as well. It is desirable to have an entity named PressRelease, but the generated code will then have numerous errors due to the collision. In my case, ModelClass.FullName for my Stage enum returns "PressRelease.EntityFramework.Model.Stage". In a number of places, this collides with the PressRelease entity name. If ModelClass.FullName could return "global::PressRelease.EntityFramework.Model.Stage" instead, it would avoid the collision.
I was almost able to work around the issue by changing the transform code, but I ran into ModelAttribute.FQPrimitiveType which can return int, bool, string, etc. in addition to my fully qualified class name. In C#, global::int is invalid. Inside FQPrimitiveType is the line: return modelEnum.FullName;, so fixing ModelClass.FullName should work. I realize that there is an argument to be made that says: "Don't do that!", but I believe that this would be a nice feature.
The text was updated successfully, but these errors were encountered:
I think that it is common for developers to want to name an entity with the same name as part of the project namespace. Ex: I am currently working on a press release application. The project name is PressRelease. My root namespace is PressRelease as well. It is desirable to have an entity named PressRelease, but the generated code will then have numerous errors due to the collision. In my case,
ModelClass.FullName
for my Stage enum returns "PressRelease.EntityFramework.Model.Stage". In a number of places, this collides with the PressRelease entity name. IfModelClass.FullName
could return "global::PressRelease.EntityFramework.Model.Stage" instead, it would avoid the collision.I was almost able to work around the issue by changing the transform code, but I ran into
ModelAttribute.FQPrimitiveType
which can return int, bool, string, etc. in addition to my fully qualified class name. In C#,global::int
is invalid. Inside FQPrimitiveType is the line:return modelEnum.FullName;
, so fixingModelClass.FullName
should work. I realize that there is an argument to be made that says: "Don't do that!", but I believe that this would be a nice feature.The text was updated successfully, but these errors were encountered: