Reputation: 5019
I am executing the following command (executing this inside the asp.net 5 project folder using cmd)
dnx ef dbcontext scaffold "Data Source=SQL2K14;Initial Catalog=movies;Integrated Security=False;User ID=sa;password=pass" EntityFramework.MicrosoftSqlServer --outputDir Models
and get the following error
System.Data.SqlClient.SqlException (0x80131904): A transport-level error has occurred when receiving results from the server. (provider: TCP Provider, error: 0 - The semaphore timeout period has expired.) period has expired.)
I know for a fact there is nothing wrong with my connection string because i use the same exact connecting string from the same exact machine (inside the asp.net project) using SqlCommand
to open the connection and retrieve stuff. So this would not be a network related issue or connection string at all, its purely to do with the dnx ef dbcontext
command
According to http://ef.readthedocs.org/en/latest/getting-started/aspnet5/existing-db.html#reverse-engineer-your-model this is the way to reverse engineer it but I am not sure if they updated it to be done another way as this suggests its complex and it will be simplified but not sure when it will be
Upvotes: 1
Views: 347
Reputation: 164
My commandline which works for comparism is (note connection string format is different)
dnx ef dbcontext scaffold "Server=myserver;Database=mydatabase;Trusted_Connection=True;MultipleActiveResultSets=true" EntityFramework.MicrosoftSqlServer --context ReportingDbContext --output-dir Models
Run from the root of my project directory
Upvotes: 1