小编K. *_*R. 的帖子

EF反向POCO生成器:无法加载提供者EntityClient

我在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=&quot;data source=C:\SomeDatabase.sdf&quot;" providerName="System.Data.EntityClient" />
  </connectionStrings>
Run Code Online (Sandbox Code Playgroud)
  • 安装了nuget EntityFramework.SqlServerCompact
  • 安装了Visual Studio的Entity Framework 6.1.0工具
  • 将System.Data.Entity添加到我的引用中

更新了.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)

c# poco sql-server-ce visual-studio-2012 entity-framework-6

6
推荐指数
1
解决办法
4634
查看次数

System.Text.Encoding.UTF8.GetBytes Extra Byte

为什么这一行

System.Text.Encoding.UTF8.GetBytes("ABCD±ABCD")
Run Code Online (Sandbox Code Playgroud)

给我10个字节而不是9个字节?虽然±是char(177)

是否有.Net函数/编码将此字符串正确转换为9个字节?

.net c# vb.net utf-8 character-encoding

1
推荐指数
2
解决办法
4498
查看次数