Last post Mar 23, 2014 01:11 PM by larsbehner
Mar 23, 2014 08:29 AM|larsbehner|LINK
All my tables seems to work OK over my Odata. But one thing is not working and that is the Web API against my SQL Views.
"There is already an object named 'vEmployeeAssignment' in the database."
'vEmployeeAssignment' is the true name of my view in the Azure database. It seems like something is handling it as a table, when it is not.
The reason might be that I added both the views and the tables trough Entity Framework (EF) Code First or maybe that I added every table and view as a "Web API 2 Odata controller with actions, using Entity Framework". Is it an other way of doing this with
Mar 23, 2014 01:11 PM|larsbehner|LINK
I figured this out.. I modified my database and removed all my relationships, then added a primarykey for my many-to-many "between" tables. This seems to cause the database to be more understood by the EF. Also fixing my problems. Works like smooth.
So using a combo of foreign keys as a primary key is giving strange resoults. Alt least it seems like it.