msawczyn / EFDesigner2022

Entity Framework visual design surface and code-first code generation for EF6, Core and beyond
MIT License
119 stars 21 forks source link

Selecting property types not available in the select list #28

Closed msawczyn closed 1 year ago

msawczyn commented 1 year ago

From https://github.com/msawczyn/EFDesigner2022/issues/40:

We are using several db contexts. One of the contains enums we want to use in the other contexts. Because the Type-Property of entities is restricted to the select list we specified the type directly in the .efmodel file. Is there any reason not to remove the restriction of the type field in the designer?

(submitted by @Jonathan4083)

msawczyn commented 1 year ago

Added the option Restrict property types to the designer's option page (Tools/Options/Entity Framework Visual Editor). Default is true, but setting it to false and reloading the designer will allow any property type to be typed in. Note that no validation is performed when this is done, so a bad type can be added. Best to use the fully qualified name of the type since there isn't a good way to get a namespace import into that file.

Jonathan4083 commented 1 year ago

Great, thanks a lot.