The 'Available context classes' list excludes Entity Framework models that were expected to be available.
Because of the incompatibility, you will not be able to select your 'DbContext' based context class in the 'Available context classes' list.
- 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)
- In the Properties window, change the "Code Generation Strategy" from "None" to "Default"
- 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.
- Rebuild the project
After following those steps, you will be able to select your entity model's context class in the 'Available context classes' list. The side-effect of this procedure is that you have now converted your entity model from an Entity Framework DbContext-based model to an ObjectContext-based model.
- Create a new "Silverlight Business Application" project in Visual Studio 2012
- Add a database to the App_Data folder
- Add an Entity Framework model (ADO.NET Entity Data Model), generating it from your database
- Build the solution
- Add a Domain Service Class, opening the 'Add New Domain Service Class' item template wizard
Article ID: 2745294 - Last Review: 16 Nov 2012 - Revision: 1