Table Name Mapping not working in EF 6 when using POCO classes

c# entity-framework-6 sql-server-2008-r2

Accepted Answer

Fluent Code First API

Did the tool you used produce aDbContext with OnModelCreating function that maps your data using codeOrder_Details to Order_Details table?

Remove it if there is.

first database/model

Did the software you used produce an.edmx file that causes all of the class's attributes to be ignored? (Look for it in your connection string undermetadata=res://*/Models.Model.csdl , which suggests the use of.edmx).

You must use the.edmx file to map the table if one exists.

The way the old code operates initially, in my opinion

The edmx schema was it stored in the database by the tool? Search your database for any tables that you did not create.

You will need to change the edmx schema if it is present in the database.

2
9/6/2014 2:33:54 AM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow