Data in a Razor Page | ASP.NET Core 101 [5 of 13]

preview_player
Показать описание

We've got some data and a service to manage it, now we'll foreach over our database's data and output the result in our ASP.NET website's razor page!

Learn more about ASP.NET:

Follow us:

Useful Links:
Рекомендации по теме
Комментарии
Автор

It’s amazing how you keep coming back to this video, and makes more and more sense each time!

chezchezchezchez
Автор

these two have great chemistry between them, great tutorial

ronen
Автор

Great chemistry, it is just enjoyable watching people explain things together.

donothinger
Автор

thank you for tutorial.
this is awesome.

benjaminhoang
Автор

Amazing. I never know before, there is another way to get and show data just like you did.

zeeshansafdar
Автор

the id in the model Product should be a string actually ... when the JsonFileProductServices service tries to deserialize the json file into an Enumerable list of Product object it throws an exception

mementomori
Автор

Why when instantiating the logger and ProductService objects do you not need to use the new keyword?

jasonahern
Автор

This is the first time that I look at your series. You are real funny :). Bertrand is right. If I only wanted products, I wouldn't define productservice as a class member. It is only used to get the data. Products is what I need. I also saw propg by the way as a snippet which generates a public getter and a private setter.

compateur
Автор

When you said you could put all the Model code in one page ? Did you mean you can put it all in index.cshtml page ? Or did you mean you can put all the service code in Model file ?

savemightlife
Автор

Continually getting a JsonException error. Followed the tutorial to the letter, loaded the products.json file in Firefox Developer Edition with no errors. "InvalidOperationException: The JSON value could not be converted to System.Int32. Any ideas

mikeallen
Автор

Cool charming team, good explanation! =D

technocoh
Автор

is there a link to the code they wrote in the video

Kamisama_
Автор

At 10:55, where is the IndexModel object that's being used when running the page instantiated? I don't understand how a JsonFileProductService can be implicitly passed in the IndexModel constructor without modifying any other code. Wouldn't you have to modify the code that creates a new IndexModel object by adding the new parameter?

notyouraveragecakeslice
Автор

What if we dont want to use JSON file instead of JSON how to use Database?

Codefromscratch-Safi
Автор

Trying to follow alone but my project structure is different from the video. For example Index.cshtml is in Views/Home folder and there is no Index.cshtml.cs or _Pages_Index. Has this changed since the video was created?

hakoHiyo
Автор

Hi how to close razor page after postback?

rodelbarbin
Автор

I have a feeling the ProductService should not be declared as public in the code behind file?

conaxliu
Автор

and i've tried this in VS 2019 on Windows and Mac

mikeallen
Автор

Scott said the gists are in the github readme, but nothing is in the file. The link to the code should have been in VIDEO 1 and all of the videos.

javaguitarist
Автор

I like the tutorials, but at this point they are outdated and I can't follow along due to updates in Visual Studio and the .ASP packages.

harrisfcs
welcome to shbcf.ru