dotnet / EntityFramework.Docs

Documentation for Entity Framework Core and Entity Framework 6
https://docs.microsoft.com/ef/
Creative Commons Attribution 4.0 International
1.63k stars 1.96k forks source link

Framework sample doesn't work #2435

Closed mikedice closed 4 years ago

mikedice commented 4 years ago

This issue tracker is for documentation

For product issues, use https://github.com/aspnet/EntityFramework/issues

I left the boilerplate text above. The issue I have is with this article: https://docs.microsoft.com/en-us/ef/core/get-started/?tabs=netcore-cli

The environment is on my MacBook. Latest OS updates installed The .net core framework latest is installed. Not using Visual Studio. Entity Framework was not previously installed on this computer.

sample-log.txt All you have to do to repro is walk down the steps in the article. You get a bunch of errors. Looking at the error messages it would appear that you cannot run the commands under 'Create the database' without first compiling the sample. So it looks like the steps might be out of order. If I completed the steps after 'Create the database' ran dotnet run, which also returned errors, then went back and ran the 'Create the database' steps again then the second time I compiled and ran the sample it ran without error. Please review and fix this sample.

I have added my logs which shows what happened when I tried to run the sample from start to finish.

smitpatel commented 4 years ago

Did you generate Model.cs file before running commands under Create the database?

mikedice commented 4 years ago

Hey I think what happened is I had the contents of Model.cs open in my editor but forgot to hit Save (ctrl+s). Oops. Sorry about the false alarm. I will close this issue.