Contact me these daysADO. NET Entity Framework suddenly found a strange bug.
First, let's look at this directory structure:
I saved the EDM model to a directory named "A", edited the model, and set its namespace to "commondbmodel ":
Open commondbmodel. Designer. CS to view the generatedCode:
The above namespace is actually "A", not the "commondbmodel" I set ".
This namespace is apparently consistent with the directory name, so I modified the directory name "commondbmodel ":
Modify and save the model in symbolic form to refresh the generated code and view the generated code:
It turns into "commondbmodel ".
That is to say, the namespace previously set in the property panel is invalid at all. It uses the directory name as the namespace name. I think this is not logical.
If you directly put the model under the app_code directory, the namespace attribute will take effect normally.