How can use ADO.NET Entity Framework with SQL Server Azure?


  • Hello.

    The subject is my question. I can't connect to SQL Azure from Visual Studio IDE because it shows a null object reference. Maybe I could use ADO.NET Connection String.

    Any advice?

    Thank you!

    Friday, August 28, 2009 9:43 AM


  • In another post, iesoccer replied:

    I have already created a small EF application against SQL Azure with absolutely no issues.  You have to use a local database to create the EF edmx file, but once that is done changing the connection string to the SQL Azure database using "Server" instead of "Data Source"; "Database" instead of "Initial Catalog"; and the "User ID", "Password", and Trusted_Connection=False" instead of "Integrated Security=TRUE" will allow you to develop directly against the SQL Azure database.
    The application queries, updates and inserts data via EF.
    SSMS, sqlcmd, OLE DB, and ODBC can all be used to connect and develop applications.

    I used iesoccer's instructions to create a simple Silverlight3 Application with an ADO.NET Data Model and DomainService Class. By replacing parts of the connection string in web.config as directed I was able to run the app with the corresponding SQL Azure database.
    • Marked as answer by VansFannel Friday, August 28, 2009 1:56 PM
    Friday, August 28, 2009 12:54 PM