AspNetCore.Docs icon indicating copy to clipboard operation
AspNetCore.Docs copied to clipboard

/movies doesn't load.

Open rtrunkhill opened this issue 8 years ago • 9 comments

/movies doesn't load. No SQL error when I run Update-Database I get No migrations were applied. The database is already up to date. No migrations were applied. The database is already up to date. Done. but http://localhost:port/movies doesn't load. the root page loads and works fine


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

rtrunkhill avatar Jun 26 '18 17:06 rtrunkhill

I've redone the steps. Shut down VS and restarted it. Checked all my files and migrations. not sure how to continue

rtrunkhill avatar Jun 26 '18 17:06 rtrunkhill

@rtrunkhill try downloading the completed app and running it. That should help you find the mistake you made. Step through the debugger too.

Rick-Anderson avatar Jun 26 '18 17:06 Rick-Anderson

A.Make sure the dbset is define and initial properly B.if you only have one or two migrations try to delete him (include the snapshot) then create and update again.

shlomitubul avatar Jun 26 '18 19:06 shlomitubul

Thank, Still no idea what went wrong. I just deleted the project and started all over. works fine now

On Tue, Jun 26, 2018 at 12:34 PM shlomitubul [email protected] wrote:

A.Make sure the dbset is define and initial properly B.if you only have one or two migrations try to delete him (include the snapshot) then create and update again.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/aspnet/Docs/issues/7305#issuecomment-400435933, or mute the thread https://github.com/notifications/unsubscribe-auth/AbYZ8i25RqPnwBsYdUh04yL-nrNu7ci7ks5uAozfgaJpZM4U4ZQW .

rtrunkhill avatar Jun 26 '18 20:06 rtrunkhill

Under: "Add a data model" Where it says to create the folder "Models", it already exists. So, it's confusing. Do we create new one even though one already exists? Or add the Movie class to the existing Model folder?

joemagicstr8zzz avatar Sep 10 '18 04:09 joemagicstr8zzz

This should not be marked as "closed". I'm having the same problem, and the solution is not here.

McKlatch avatar Sep 14 '18 15:09 McKlatch

There are lots of ways to make mistakes and have that problem. We have lots of customers confirming that the code works.

Rick-Anderson avatar Sep 14 '18 20:09 Rick-Anderson

i have found the solution while scaffolding the project, the scaffolding was unable to find the Movies folder. Change it to below. Use backslash instead of forward slash. Before excuting the below command, you may want to create a Movies folder first inside your Pages folder. I am using VS code.

dotnet aspnet-codegenerator razorpage -m Movie -dc RazorPagesMovieContext -udl -outDir Pages/Movies --referenceScriptLibraries

jasonwongys avatar Sep 19 '19 03:09 jasonwongys

i have found the solution while scaffolding the project, the scaffolding was unable to find the Movies folder. Change it to below. Use backslash instead of forward slash. Before excuting the below command, you may want to create a Movies folder first inside your Pages folder. I am using VS code.

dotnet aspnet-codegenerator razorpage -m Movie -dc RazorPagesMovieContext -udl -outDir Pages/Movies --referenceScriptLibraries

It worked for me

Maracaipe611 avatar Sep 10 '20 20:09 Maracaipe611