[Quote]With Visual Studio 2012, Entity Framework now creates 'DbContext' based context classes by default, but WCF RIA Services does not support 'DbContext' based context classes. The 'Add New Domain Service Class' wizard detects when a 'DbContext' class has been created in your project and displays the message.
Because of the incompatibility, you will not be able to select your 'DbContext' based context class in the 'Available context classes' list.[/Quote]
[Quote]In order to utilize your Entity Framework model with WCF RIA Services, you must convert it to an 'ObjectContext' based model. This can be done using the following steps:
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.
[/Quote]
这个问题没有别的解决办法吗?每次新建项目都得[代码生成策略]的[无]改成[默认值],再把.tt文件删掉?