Cannot create database with Code-First

c# entity-framework-6 sql-server-2016-express wpf

Question

Entity Framework v6 is what I'm using, along with SQL Server 2016 Express and Visual Studio 2015. I've already built a database using aSqlConnection and SqlCommand and stuff the SQL into a string.

I'm now learning EF6 on Guide to Entity Framework. I basically copy and paste my code into the extremely straightforward code-first example, but the SSMS database that was created is still not visible. I get no errors from my code either.

I took a screenshot instead of putting the code in. I'm hoping someone can let me know where the instruction or I'm going wrong.

enter image description here

ï¼»EDIT] As a result of Sampath's advice, I get the following error: zzz -32-zzzenter image description here

[EDIT - Sort of resolved]

I run the same code on a different computer with the same configuration, and it runs successfully. Therefore, I think there may be some registry issues or SQL Server corruption. I remove ALL previous versions of SQL Server and all associated tools, manually delete any directories and files, then completely reinstall SQL Server Express 2016 and all supporting software. My code then operates.

I don't think this is a solution, but if someone has any ideas as to what could have caused this issue, I'd be willing to attempt to reproduce it or offer a true fix.

1
3
10/9/2016 6:57:02 AM

Popular Answer

ZZZ_tmp
2
10/8/2016 10:26:45 AM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow