9

Are Oracle synonyms supported by Entity Framework, in any form?

When I connect to the database in Visual Studio, it only gives me the option to add Tables, Views and Stored Precedures to my Entity Framework Data Model. In the server explorer panel I can see the Synonyms in the list.

Our database policy mandates that I am only given access to synonyms, so unfortunately I cannot create a view, or work around Entity Framework's limitations on the database side.

Perhaps there is a way to manually create a data model and hook it up?

Any help would be much appreciated!

Matt
  • 3,676
  • 3
  • 34
  • 38

1 Answers1

5

As far as I know the Entity Framework doesn't provide support for synonyms yet. I had a similar problem recently that I overcame with Views, which you don't have to your avail.

There are some workarounds, maybe you can use them.

Community
  • 1
  • 1
Dante
  • 3,833
  • 4
  • 38
  • 55
  • Thanks for the tip. Unfortunately I don't even have access to an Oracle dev server to create tables on to use the workarounds. I'll just use a DataAdapter for now, and revisit EF after VS 11 is released perhaps. – Matt Mar 02 '12 at 14:19
  • Yes, the standard workaround for schema names (i.e. find and replace explicit schema and just infer default schema) also applies to synonyms – BigMomma Oct 16 '12 at 14:14
  • I think you should update the answer with [adding more schemas to the list of schemas where EF will search for objects to add](http://stackoverflow.com/a/7598378/1219280) - as the solution. – Veverke Jul 03 '16 at 14:46