I am trying to generate my edmx file for my database in Visual Studio 2013 against either a mssql 2012 or 2008 database server and table set. The edmx file generates with out issue, and everything looks fine until i try to compile the project. Every single object representing a database table errors out with the following messages.
The type name 'Collections' does not exist in the type 'Model.blah.System'
The type name 'DateTime' does not exist in the type 'Model.blah.System'
The using statements are correctly located inside the generated codes name space declaration, just like all other EF .edmx files i have seen in the past.
The error messages are consistent across the board for all database objects. NO matter what i do how i generate the my edmx model it is useless and not usable.
I am running with Visual Studio 2013 Update 2. I have tried using EF5 and EF6 to no avail. I need some help figuring out why for the life of me i can't correctly generate my EF model.
I'd guess that you have a namespace collision, where the compiler fails because you defined a System
class that is ambiguous with the System
namespace.
Rename your System
class to something else to solve your problem.
Found the issue I had a Systems table that would stand for systems of measurement. When EF would process the tables it would remove the s from the end of the table causing a name conflict to occur. I am going to close this question, but wanted to get this out there for people to be aware of.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With