odetocode / odetofood Goto Github PK
View Code? Open in Web Editor NEWA repo for the ASP.NET Core Pluralsight Project
License: MIT License
A repo for the ASP.NET Core Pluralsight Project
License: MIT License
You spent a lot of time telling us how to install datatables.net via npm and simply assumed that we have npm. I'm using Visual Studio 2019, I have that node.js editing option installed, and even the command line console via Visual Studio has no clue what npm is.
I'm probably going to spend time trying to figure out a different way to install datatables.net, but I'm not going to bother with npm.
The way I see it, if the course isn't about npm, and the instructor never bothered to make sure that we knew how to get our hands on npm, and the course is marketed to beginners, then npm isn't of any importance to said course.
After I applied what is in Module 4, clip 4, I can see the new restaurant name in the edit page, however when I go to the list page I don't see the new name.
I tried to debug to see what is happening, as long as I stay in the edit pagenthe data in memory is changed, but when I go to other pages the InMemoryRestaurantData Class constructor is called therefore we go back to the initial values
My question here, is this behavior normal? every time I call a page it will re initialize all the objects in it?
Should I continue to the next clip or what, I'm confused...
The method generated in this section in ASP.NET 6 is a Task
app.Use(SayHelloMiddleWare);
Task SayHelloMiddleWare(HttpContext arg1, Func<Task> arg2) {}
This may need some clearing up for future use
I understand this is not the purpose of this lesson but it might trip up some that come accross it,
Hi all,
I'm following the ASP.NET Core Fundamental course. Since module 2 section 9 the code was good (except for the Layout CSS which is not shared in the gitHub repo). When I added the page Setup.cs and the restaurants, my code returned the following error. Is there someone who can help me solving the problem?
Hi Scott,
I'm enjoying the instruction, but I must have missed an instruction, or "fixed" something I should not have fixed along the way through your ASP.Net Core lesson, but I've run upon this CS0579 error twice now getting up to section 3.8 "linking to the details."
The first time I ran into this error, I was able to add a series of "false" <GenerateAssembly[something]Attribute>
statements to the .csproj file and the duplication error cleared itself. The errors started popping up again around section 3.8 and even though I back out of the changes for several modules, I keep getting the error.
Originally I thought the problem was caused because I created the OdeToFood project with the target framework of ".Net Core 2.1" and then failed to do the same for the "OdeToFood.Core" and "OdeToFood.Data" projects. And I switched all three to 2.1, and then to 3.1 trying to see if there was some reason why the compiler is trying to build these assemblies multiple times. Setting the "generate" flags to false for all of them in each .csproj file doesn't seem to eliminate the errors either.
I'm just going to archive the solution and start over again and not try to be clever by using 2.1, and follow the added instructions for 3.0+ here on github. But, I figured I would pass this along in case others were having the same problem.
Good Fortune,
Richard
README.md file is missing instructions.
Link to Course ASP.NET Fundamentals, Module 3, Clip 5: "Using the Scaffolding Tools"
0:34
This is done using a tool, which is the dotnet aspnet-codegenerator. In the README file of the OdeToFood GitHub repository, I have placed some instructions on how you can install this tool. I just want to run it here to show you that you can use this tool to run a generator. There's several generators available, for areas, for controllers, for identity. The one we're using is the one for Razor Pages.
https://github.com/OdeToCode/OdeToFood#odetofood
Provide instructions and/or link to proper tool and 3rd-party instructions from Microsoft.
Example:
You will be installing the Nuget Package:
dotnet-aspnet-codegenerator
Although Microsoft's guide is in regard to Microsoft Identity, the steps for installing the code generator apply. You can follow Microsoft's instructions for installing this code via the command line from their guide on Scaffold Identity.
I have reproduced the steps below:
dotnet tool install -g dotnet-aspnet-codegenerator
dotnet add package Microsoft.VisualStudio.Web.CodeGeneration.Design
dotnet restore
In the tutorial & even after your .NET Core 3 update, the span tag in List.cshtml uses the bootstrap tag input-group-btn <span class="input-group-btn">
Per the documentation from Bootstrap:
Input groups
Input group addons are now specific to their placement relative to an input. We’ve dropped .input-group-addon and
.input-group-btn
for two new classes, .input-group-prepend and .input-group-append. You must explicitly use an append or a prepend now, simplifying much of our CSS. Within an append or prepend, place your buttons as they would exist anywhere else, but wrap text in .input-group-text.Validation styles are now supported, as are multiple inputs (though you can only validate one input per group).
Sizing classes must be on the parent .input-group and not the individual form elements.
When following the course I was having an issue passing data into TempData.
This caused an issue when trying to display the "Restaurant saved!" alert on the details page.
Root cause was that by default the Cookie Policy Options are set to need consent. Could be because I am in Europe.
Changed to false in Startup.cs and the issue was resolved.
Hi, I'm getting the following error:
I'm at a loss, following tutorial (ASP.NET Core Fundamentals part 6) - step by step and have several issues.
1.) footer covers over the generated cards in /Lists
2.) The footer with a total number of restaurants generated in a default view component and a link to Lists - doesn't actually link where it's supposed to but instead to whatever page you're currently on instead.
The only difference in code is using class 'card' instead of 'well' and 'Panel' as BS5 no longer supports those.
Video titled "Creating the New Project" talks about notes for VS4Mac users in the repo but I am finding none. Is this course adequate for VS4Mac users?
Is the README.md meant for use in VS Code?
What are the sequence of steps needed? I suppose the repo is the version as at the end of the complete course? I am still at Module 4.
I cloned the repo and pressed F5. The build was successful, but then it ran into bin\Debug\n...\OdeToFood.dll does not exist
.
I then tried the first of the three steps shown for Clip 2, dotnet new razor
, and Git shows 51 files changed. However, I couldn't find what actually changed, as git diff shows that the previous versions are all blank files. I am a bit puzzled by this.
What is the proper way to make use of the repo? Thanks.
Am I stupid or is there no OdeToFood.png here?
In Module 3 of the Readme.md, I installed aspnet-codegenerator per instructions: dotnet tool install --global dotnet-aspnet-codegenerator.
Then tried to use razorpage generator, and command window says
No code generators are available in this project. Please add the 'Micrososft.VisualStudio.Web.CodeGeneration.Design' NuGet packate to the project. Pleas add Micrososoft.VisualStudio.CodeGeneration.Design package to the project as a NuGet package reference.
Maybe there is a step missing in your instructions in Module 3 of your Readme.md to add the missing Nuget package.
In the tutorial & even after your .NET Core 3 update, the button tag in List.cshtml uses the bootstrap tag btn-default
Unfortunately, there doesn't seem to be an exact replacement, but per stackoverflow the closest equivalent seems to be btn-outline-secondary
Also getting this:
While doing the model binding for the Details page, the Name, Cuisine, and Location data never populate.
Link to Course ASP.NET Fundamentals, Module 3, Clip 8: "Linking to the Details"
5:52
And now I have my little zoom in icon on the right, and if I click on this, I can see yes, that went to /Restaurants/Detail query string restaurantId=2. So my tag helpers asp-page and asp-route, they decided the best way to pass a restaurant ID to the Detail page is by placing the restaurant ID in the query string.
I expect to see the Name as a header, Id, Location, and Cuisine related to the Id parameter passed in.
The Id comes in, but the Name, Location, and Cuisine do not. The intellisense doesn't notice anything wrong, and in fact suggests the Location field.
The lack of name and location data is both in my code, in this video, and the next video.
I believe this is because we create a new Restaurant, but never assign values to the other fields.
Update the videos where you reassign the values.
Or provide a brief voice-over mentioning those fields are not yet bound and will be addressed later in the course.
Your final source code below shows you update this later, so personally I would find this helpful to mention as I spent some time attempting to debug before I discovered the issue: https://github.com/OdeToCode/OdeToFood/blob/master/OdeToFood/OdeToFood/Pages/Restaurants/Detail.cshtml.cs
The problem is that when i'm pressing back button in chrome the value of input field is changed in inspector but the value is not changed in browser window. This does not happen in edge i dont know why.
here you can see that the value in inspector and browser are different.
here is the code. I checked in this project too but this project too have this problem.
Noticed in the video & current code, when you reference the Edit page on the Add New button, your slash is a backslash, where everywhere else in the code it's a forward slash. It actually still works fine, probably through ASP.NET magic, but thought I'd mention it for consistency.
<a asp-page=".\Edit" class="btn btn-primary">Add New</a>
Using donet core 3.1, not able to load local files from node_modules.
"Not allowed to load local resource" error.
Though I have installed nuget package for OdeToCode.UseNodeModules version 3.0.0 and in Startup file I am doing
app.UseNodeModules();
I ran the 3 suggest terminal commands for Module 2. The browser was not launched.
I then tried manually launching a browser. I tried the below URLS:
http://localhost:5000
https://localhost:5001
Both of them generated security errors
I then tried
https://localhost:44372
I got a Site cant be reached error
It looks like the link in the readme expired.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.