I am trying to create database using Code First approach. When I run the following code I am getting the following exception. Is there anything wrong in the fields that I de
I've just ran into the exact same issue - I'd already created my database on a development SQL box inside our network that needs SQL authentication.
When I ran my app, no tables were created. I found this awesome but simple article about creating a Code First Database Initializer Strategy which first checks to see if the database exists and then runs a script against the database to create the tables.
As stated in the article - pay attention that when such a strategy is deployed, whenever the application starts over, all the database tables will be recreated! This strategy should only run once.
But you already knew that.