Invalid Entity Framework Object Name Error

I am using VS2008 to connect to a SQL Server database to populate it in C #. This happens very well, I can query, insert and update all the tables in my database successfully, except one. Anytime when I try to execute a query or insert into a single table, I get the following error:

Message = "Invalid object name 'DB_NewModelStoreContainer.DATATYPE'."

The request that generated this error is:

var test3 = (from o in context.DATATYPE
where o.DATETYPE_NAME == "Single"
select o).First();
(yes I know it should be DATATYPE, but that is not the problem =) )

Whenever I added a database to my project, for some reason, it marked every attribute in the DATATYPE table as a primary key. I entered the xml of the .edmx file and fixed it, but I still get this error, and I cannot find out why> <. Any help at all would be greatly appreciated! Thanks in advance.

+3
1

EntityFramework PrimaryKey Foreign Key, .

, , . ,

edmx , , - , , - . , , edmx .

0

Source: https://habr.com/ru/post/1768619/


All Articles