Entity name conflicts in Visual Studio -


i'm new entity framework. i've created model-first schema in visual studio 2012 ef5, i'm having trouble getting generated code build. 1 of entities ("test") has same name model (edmx) , project (csproj) files, conflicts namespace (test namespace used type). decided change namespace setting "custom tool namespace" .tt files. worked, found "test" entity's generated .cs file entirely empty (other entities generating properly), had build errors other entities reference "test". renaming entity results in generated class, , therefore building project, want use original name.

i end scratching project , starting over, ensuring choose unique names project, model, , entity. i'd rather know how fix if possible in case run similar when project further along , it's not easy start over.

you can use use alias on using directive, e.g. using project = pc.mycompany.project; differentiate between namespaces. see msdn


Comments

Popular posts from this blog

java - JavaFX 2 slider labelFormatter not being used -

Detect support for Shoutcast ICY MP3 without navigator.userAgent in Firefox? -

web - SVG not rendering properly in Firefox -