/movies doesn't load.
/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.
- ID: 6719f08e-3bd7-dc1a-71df-f2ef9fbca9d8
- Version Independent ID: 7096fdb3-612e-9e00-bd0b-8ea4886a09ce
- Content: Add a model to a Razor Pages app in ASP.NET Core
- Content Source: aspnetcore/tutorials/razor-pages/model.md
- Product: aspnet-core
- GitHub Login: @Rick-Anderson
- Microsoft Alias: riande
I've redone the steps. Shut down VS and restarted it. Checked all my files and migrations. not sure how to continue
@rtrunkhill try downloading the completed app and running it. That should help you find the mistake you made. Step through the debugger too.
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.
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 .
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?
This should not be marked as "closed". I'm having the same problem, and the solution is not here.
There are lots of ways to make mistakes and have that problem. We have lots of customers confirming that the code works.
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
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