EDMX generated with ODT/ODAC, context class not showing in Domain Service Class

104 views Asked by At

I am following an msdn walkthrough for creating an RIA services solution with Silverlight. Here is the article link. I have followed at least 4 other articles and found like a dozen more over internet but all of those create edmx from SQL server. In my case, I have to use Oracle in backend, so I have created the data model through Oracle Development Tool, Oracle Provider for .Net.

Oracle Provider

After generating the edmx and building everything,

enter image description here

I move on to create a domain service class to use the classes in silverlight project, but for some reason the context class doesn't load in the dropdown where it should.

enter image description here

A sample class generated by the edmx looks like this

enter image description here

I have been trying to do this for a week now, and after having been tried for half a dozen times, I need help.

1

There are 1 answers

0
Mashton On BEST ANSWER

If you are using Visual Studio 2012 have a look here: http://support.microsoft.com/kb/2745294

In summary:

  1. Open your entity model in the designer (If needed, click in the "white space" of the designer to ensure no objects within the model are selected)
  2. In the Properties window, change the "Code Generation Strategy" from "None" to "Default"
  3. Delete the two ".tt" files that are adjacent to the model, with the assumption that you have not modified these files beyond their original state when the entity model was created. If you have modified these files, then customizations to your entity model will be lost.
  4. Rebuild the project