In 3.0, manually change VS to use data over models folder
I'm working through this tutorial for mac. For the "Add a database context class" step, should the folder be "Models" instead of "Data"? The step references the folder as if it's already been created. Also, are we to use the General > Empty Class method to add the file?
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
- Technology: aspnetcore-tutorials
- GitHub Login: @Rick-Anderson
- Microsoft Alias: riande
It doesn't matter. Running the scaffolder from VS uses the wrong namespace - but it doesn't matter. I'll clarify that in the next update.
My apologies, but that comment pretty much confused me, so it doesn't matter in which folder we put the file? Or should we create separate folder Data, or put it in folder Models? Should I create file RazorPagesMovieContext.cs and put there a method RazorPagesMovieContext and put it in Data folder?
Follow the instructions.
The instructions stays to add the RazorPagesMovieContext class to the Data folder, but then the namespace shows "RazorPagesMovie.Models". If it doesn't matter, then it should be mentioned in the tutorial itself to prevent the confusion.