My Winform project using Linq 2 SQL data access to Azure
I have a winform project using LINQ 2开发者_Go百科 SQL as data access. I want to move the SQL Server database to the SQL Azure. Is there any problem with my data access, specifically L2S or I have to rewrite the data access using e.g. EF 4? I guess this should work only with changing the connection string?
Thank you!
Linq to SQL is fine and will work against SQL Azure. EF 4 will work too. However keep in mind that regardless of the tool you use you will need to account for connection retries, or connection loss in the middle of an operation. See this article for more information on how to handle this issue:
http://blogs.msdn.com/b/cesardelatorre/archive/2010/12/20/handling-sql-azure-connections-issues-using-entity-framework-4-0.aspx
Also, more information and a complete list of possible connection loss and error codes to trap can be found here:
http://social.technet.microsoft.com/wiki/contents/articles/sql-azure-connection-management-in-sql-azure.aspx?wa=wsignin1.0
Hope this helps.
精彩评论