I am using two databases in the project: Azure and Sql Compact. Entity Framework was generated using Compact database, but now I 开发者_如何学运维am trying to use it to connect to Azure database with the same schema passing to Context constructor Azure connection string:
but when it tries to get some data it gives me the exception: "SqlCeCommand.CommandTimeout does not support non-zero values."
Why it uses Compact command if provider is specified correctly? How I can fix this?
http://www.codeproject.com/Articles/82017/Preparing-an-Entity-Framework-model-for-multi-prov.aspx
this may not have been the cause of your issue but I received this error when I had manually set the command timeout for the SqlCeCommand that I was using to connect to my Compact Edition database.
This is the setting I removed:
cecmd.CommandTimeout = 720;
I hope this helps someone else!
精彩评论