我在VS2012中使用 EntityFramework Reverse POCO Generator
VS2012 ...
这是我的连接字符串:
<connectionStrings>
<add name="Entities" connectionString="metadata=res://*/Model1.csdl|res://*/Model1.ssdl|res://*/Model1.msl;provider=System.Data.SqlServerCe.4.0;provider connection string="data source=C:\SomeDatabase.sdf"" providerName="System.Data.EntityClient" />
</connectionStrings>
Run Code Online (Sandbox Code Playgroud)
更新了.tt文件以指向我的connectionString,当我保存时,我收到此错误(警告)::
警告1运行转换:无法加载提供程序"System.Data.EntityClient" - 无法找到请求的.Net Framework数据提供程序.它可能没有安装.
所以它没有生成任何代码.有任何想法吗?
这是Database.tt文件的片段:
<#@ include file="EF.Reverse.POCO.Core.ttinclude" #>
<#
// v2.5.0
// Please make changes to the settings below.
// All you have to do is save this file, and the output file(s) is/are generated. Compiling does not regenerate the file(s).
// Misc settings **********************************************************************************************************************
// Namespace = ""; // Override the …
Run Code Online (Sandbox Code Playgroud) 为什么这一行
System.Text.Encoding.UTF8.GetBytes("ABCD±ABCD")
Run Code Online (Sandbox Code Playgroud)
给我10个字节而不是9个字节?虽然±是char(177)
是否有.Net函数/编码将此字符串正确转换为9个字节?