简体   繁体   English

在 edmx 文件(以支持 SQL Server 2005)上使用 ProviderManifestToken=2005 有什么副作用吗?

[英]Any side-effects for using ProviderManifestToken=2005 on edmx -file (to support SQL Server 2005)?

In development we use SQL Server 2012, but some customers might have versions as old as 2005. In order to make the Entity Framework data models work with the older versions, the ProviderManifestToken (found in the edmx-file) must be set to 2005.在开发中,我们使用 SQL Server 2012,但有些客户的版本可能早于 2005。为了使实体框架数据模型与旧版本一起使用,ProviderManifestToken(在 edmx 文件中)必须设置为 2005。

Now my question is, does this have any side-effects?现在我的问题是,这有任何副作用吗? We have noticed that some data bindings (winforms) broke at about the same time as we changed this, but that could all be a coincidence.我们注意到一些数据绑定(winforms)在我们改变它的同时被破坏,但这可能是巧合。 So, it this, or are there any other negative effects for changing this value?那么,就是这个,或者改变这个值还有其他负面影响吗?

ProviderManifestToken is mostly used during Sql Generation to ensure that the generated queries will work on the targeted version of the database. ProviderManifestToken 主要在 Sql 生成期间使用,以确保生成的查询将适用于目标版本的数据库。 Since in case of Sql Server queries that worked for previous version should continue to work on the current version this should not be a problem.因为对于适用于以前版本的 Sql Server 查询应该继续适用于当前版本,这应该不是问题。 So in general what you are doing should work since you will be sending Sql 2005 queries to Sql 2008/2012 database.因此,通常您正在做的事情应该可以工作,因为您将向 Sql 2008/2012 数据库发送 Sql 2005 查询。 I don't know much about binding but it seems unlikely to me that it was caused by using 2005 as the ProviderManifestToken.我不太了解绑定,但在我看来它不太可能是由使用 2005 作为 ProviderManifestToken 引起的。 The scenario where I saw some surprises was when you change your manifest token from 2005 to 2008 (basically you upgrade your database and your app) - the confusion was mostly around datetime/datetime2 (AFAIR datetime2 types suddenly may show up in queries)我看到一些惊喜的场景是,当您将清单令牌从 2005 年更改为 2008 年时(基本上是您升级了数据库和应用程序)- 混乱主要围绕 datetime/datetime2(AFAIR datetime2 类型可能会突然出现在查询中)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM