I am new to the beautiful world of Microsoft Azure and made my first welcome world. The next step is to create the database (entityframework), but I get an exception when creating the database from PackageManagerConsole (PMC). I read several posts on the Internet explaining that I need to add startupprojectname to the PS command, but unfortunately this will not solve my problem.
I have 2 projects in my solution.
- "partyonwebsite" which is a startup project and obviously my site :).
- "models" where I will create my models / entities.
In the "models" project, I have the classes "User" and "UsersDb". UsersDb is a class that inherits from DbContext.
Now, when I execute the following line in PMC:
enable-migrations -StartUpProjectName "PartyOnWebsite" -ContextTypeName "Models.Users.UsersDb"
I get the following (not very useful) error:
System.ArgumentException: The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG)) The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))
I looked at get-help enable-migrations and played a little, but not very lucky.
Has anyone encountered the same problem? Or can you point me in the right direction to help me solve this problem?
Many thanks!
Bas
source share