次のリンクのテンプレートに従って、事前に生成されたビューがあります。
http://blogs.msdn.com/b/adonet/archive/2008/06/20/how-to-use-a-t4-template-for-view-generation.aspx
Entity Framework 5.0 に改善する必要がありますが、次のようにスキーマを置き換えると:
stringBuilder.Replace(" http://schemas.microsoft.com/ado/2008/09/mapping/cs ", " http://schemas.microsoft.com/ado/2009/11/mapping/cs "); stringBuilder.Replace(" http://schemas.microsoft.com/ado/2008/09/edm ", " http://schemas.microsoft.com/ado/2009/11/edm "); stringBuilder.Replace(" http://schemas.microsoft.com/ado/2008/10/edmx "," http://schemas.microsoft.com/ado/2009/11/edmx "); stringBuilder.Replace(" http://schemas.microsoft.com/ado/2009/02/edm/ssdl ", " http://schemas.microsoft.com/ado/2009/11/edm/ssdl ");
私はまだ次のエラーがあります:
警告 3 既定のターゲット Entity Framework バージョンには、edmx スキーマ バージョン 2.0.0.0 以下が必要です。指定されたスキーマはバージョン 3.0.0.0 です。この警告を回避するには、対象の Entity Framework のバージョンを明示的に指定します。これを行うには、EdmGen.exe コマンド ライン ツールを targetVersion オプションと共に使用するか、GenerateCode メソッドを呼び出すときに targetEntityFrameworkVersion パラメーターを含めます。
テンプレートを使用してこの問題を解決する方法はありますか?
テンプレートを使用してEdmGen に /targetversion:4.5 を追加するのと同じことは何ですか?