跳到主要內容

發表文章

目前顯示的是 2015的文章

entity framework在SQE Server 2005 / 2012之間變換環境的問題.

ASP.NET C# MVC 4.0 Entity Framework 6.0 測試環境:SQL Server 2012 正式環境:SQL Server 2005 遇到問題: 在測試環境都沒問題。 但是程式移到正式環境後,只要用entity framework linq查詢到datetime格式就出現例外狀況!!! 解法如下: Open your EDMX in a file editor (or “open with…” in Visual Studio and select XML Editor). At the top you will find the storage model and it has an attribute ProviderManifestToken. This has should have the value 2008. Change that to 2005, recompile and everything works. NOTE: You'll have to do this every time you update the model from database. 來源網址:http://stackoverflow.com/questions/316422/using-sql-server-2008-and-sql-server-2005-and-date-time