将现有 POCO 类的名称更改为您期望 EF 将生成的名称,以便更新您的引用。然后删除旧的 POCO 类并生成 EF 类然后编译您的解决方案
Change the namespces of your existing POCO classes to the one you expect EF will generate and so that your references will be updated.Then delete old POCO classes and generate EF classesThen compile your solution
我认为您所说的普通实体是指 POCO 的实体。您可能需要删除您编写或生成的 POCO 类,并将 edmx 文件的构建操作设置为 EntityDeploy。
希望这有帮助。
By plain entities i presume you mean POCO's. You probably need to delete the POCO classes u wrote or generated and set the build action of the edmx file to EntityDeploy.
您只需删除您可能使用过的任何旧 T4(如果您使用过 POCO T4),然后从您的模型中添加新的自我跟踪 POCO T4。 工作应该足够了。
You just have to remove any old T4 you may have used (if you used POCO T4), and add new self tracking POCO T4 from your model. It should be enough to work.
发布评论
评论(3)
将现有 POCO 类的名称更改为您期望 EF 将生成的名称,以便更新您的引用。然后删除旧的 POCO 类并生成 EF 类然后编译您的解决方案
Change the namespces of your existing POCO classes to the one you expect EF will generate and so that your references will be updated.Then delete old POCO classes and generate EF classesThen compile your solution
我认为您所说的普通实体是指 POCO 的实体。您可能需要删除您编写或生成的 POCO 类,并将 edmx 文件的构建操作设置为 EntityDeploy。
希望这有帮助。
By plain entities i presume you mean POCO's. You probably need to delete the POCO classes u wrote or generated and set the build action of the edmx file to EntityDeploy.
Hope this helps.
您只需删除您可能使用过的任何旧 T4(如果您使用过 POCO T4),然后从您的模型中添加新的自我跟踪 POCO T4。
工作应该足够了。
You just have to remove any old T4 you may have used (if you used POCO T4), and add new self tracking POCO T4 from your model.
It should be enough to work.