6

I'm trying to integrate my Oracle Database into my ASP.NET app, but I keep getting this error :

Error 2002: The EntityContainer 'OracleDBTargetContainer' for the storage model specified as part of this MSL does not exist in MetadataWorkspace.

I've tried everything I could think of but still can't figure out what's wrong. What can I do to diagnose the root cause of this?

This is still new to me so I might miss something very obvious.

I'm assuming it my not like my database as the Diagram displayed when I integrated another DB. I've checked the foreign keys, primary keys, ... but to no good.

Using VS2013 with ODP.NET 12c Release 3.

EDIT : My EntityContainerMapping is empty, is that normal?

<EntityContainerMapping CdmEntityContainer="PMModelContainer" StorageEntityContainer="PMModelTargetContainer"></EntityContainerMapping>
JuFra
  • 173
  • 3
  • 11

1 Answers1

9

I found what was wrong.

One of my foreign key didn't match the primary key (Number 20 instead of Number 10)

I saw on stack overflow that it could be a problem and checked my tables but I missed that one obviously.

How did I realize it ? Well because rather than creating the EF Designer, I chose the Code First from database option, and, oh, what do you know, the error message now tells you EXACTLY what the problem is ! (Table names and columns).

JuFra
  • 173
  • 3
  • 11