ASP.NET Core Web API .NET 8 2024 - 6. POST (Create)

  Рет қаралды 34,536

Teddy Smith

Teddy Smith

Күн бұрын

Пікірлер: 42
@pierrerochette6209
@pierrerochette6209 23 күн бұрын
Thank you so much for your videos, just the best way to learn .NET coding
@atheri0_n
@atheri0_n 10 ай бұрын
Bro, you are a LIFESAVER
@touseefghazanfar8487
@touseefghazanfar8487 Ай бұрын
True
@johnconnor9787
@johnconnor9787 10 ай бұрын
Nice course. Great explanation
@DalesRobotics
@DalesRobotics Ай бұрын
You are awesome bro. Big ups for sure
@Dahiana-z3k
@Dahiana-z3k 6 ай бұрын
I really like your videos, you're explanations are always clear. Thank you!!
@kuzaytepecagri
@kuzaytepecagri 5 ай бұрын
Perfect explanation sir, thank you for your efforts.
@stephanieezat-panah7750
@stephanieezat-panah7750 3 ай бұрын
I have to giggle at that "SaveChanges". I see that it is analogous to "commit". .....And. just how many times did I forget that??? lol
@eatersdaily
@eatersdaily 8 ай бұрын
Dude i love the way how to teach, i watched these till episode 6 and i faced with a lot of problems and puzzles , but as i keep going, it is going to be easier! tnx a billion, would you please prepare a tutorial about how to create a website with blazor and dotnet?
@mohitarya5189
@mohitarya5189 Ай бұрын
Thank you 😊
@njlei4412
@njlei4412 3 ай бұрын
great videos. Thanks a lot.
@Khal_Rheg0
@Khal_Rheg0 7 ай бұрын
Why sometimes use DTO and other times Dto? It makes the naming scheme a bit confusing. I got an error because I used ToStockFromCreateDto instead of ToStockFromCreateDTO.
@antoniofuller2331
@antoniofuller2331 2 ай бұрын
Good thing I read your comment before starting this video
@irondesagitario
@irondesagitario 24 күн бұрын
yeah, it's annoying lol Simply make use of the format you are more comfortable cuz it's simply the name of the function you create.
@kristiansmurds2067
@kristiansmurds2067 Ай бұрын
How nice that you never even need to import anything. Just time and all imports automatically, but for me I cannot write a line without spending time on thinking what from where, how I need to import to get rid of red underlines
@TeddySmithDev
@TeddySmithDev Ай бұрын
this will get easier with practice!
@aldkdenedik2451
@aldkdenedik2451 10 ай бұрын
Nice course
@dyakosekanyan1672
@dyakosekanyan1672 7 ай бұрын
Thank you, my Bro
@Hamza-ky8us
@Hamza-ky8us 10 ай бұрын
One question. Does the EF handle the generation of the Id value? I didnt see any connection to it. And is it safem that a new Id will not be a used one?
@colin_williams_dev
@colin_williams_dev 7 ай бұрын
Yeah I agree, I found this a bit ambiguous. My guess is because the Mapper method: `ToStockFromCreateDTO` returns the Class **Stock**, and Stock has an int `Id` that is not-nullable; Entity must enforce the generation of a unique(?) Id when you new up a Stock (which will be the return stored in the local `var stockModel` returned from the `return new Stock{...} inside the Mapper method `ToStockFromCreateDTO`.
@Khal_Rheg0
@Khal_Rheg0 7 ай бұрын
Thank you!
@khorren91
@khorren91 Ай бұрын
So, I have read the comments so far, analyzed the code, and I couldn't find how the ID is created. Can anyone explain this? I also looked into the github, but I didn't find anything.
@TeddySmithDev
@TeddySmithDev Ай бұрын
the id is generated by the database automatically via MS sql IDENTITY(). When you create table via ef core it does it automatically for you. You can toggle it off in certain cases if you want to create your own but for simple apps its easier to just auto generate them.
@khorren91
@khorren91 Ай бұрын
@@TeddySmithDev Ah, I didn't know that-thanks for the clarification. Someone mentioned that it has to do with some background processes. Sometimes, when I watch those types of guides, I like to analyze every detail to gain a better understanding. When I find something I can't grasp, I feel the need to uncover it at any cost.
@shafialanower3820
@shafialanower3820 Жыл бұрын
From your experience do you enjoy MVC or ASP.Core more? I’m relatively new didn’t know they stopped updating MVC
@TeddySmithDev
@TeddySmithDev Жыл бұрын
I would say .NET core API. You don’t have to worry about the front end.
@antoniofuller2331
@antoniofuller2331 2 ай бұрын
​@@TeddySmithDevhmm
@seyolas3588
@seyolas3588 6 ай бұрын
i dont think you have knowlodge of the things that happening behind the scenes. The nameof(getStockById) expression does not call the getStockById function; instead, it returns the name of the function as a string. This string is used by the CreatedAtAction method to generate the URL for the newly created resource.
@tod.moment
@tod.moment 8 ай бұрын
Very nice Thank you for the best practice and I have a question please. What is this theme.
@TeddySmithDev
@TeddySmithDev 8 ай бұрын
Night Owl + Material Icons
@tod.moment
@tod.moment 8 ай бұрын
@@TeddySmithDev Thank you very much.
@jonasjohansson1511
@jonasjohansson1511 4 ай бұрын
Automapper is nice so you don't have to rawdog all the mappers.
@renatyrn
@renatyrn 11 ай бұрын
The great course so far. Why the id of the created stock so different from others? You ain't handle this moment in code.
@mischief9499
@mischief9499 10 ай бұрын
because he must have inserted many rows on the same table and then removed those rows, but the DB will not rollback from the identity numbers it has created, that is why created stock Id is different from others. for example if you insert row1, row2 and row3, the respective identity IDs for them will be 1, 2 and 3. Now if remove all rows and insert one new row, the identity assigned to it will be equal to 4, not 1.
@mischief9499
@mischief9499 9 ай бұрын
@@moodycat12 honestly dont know, i only guessed the reasoning behind why the row numbers are so different
@wolfgangdiemer2511
@wolfgangdiemer2511 9 ай бұрын
Nice video, but it hurts a little, that you didn't change the mapper method name ToStockFromCreateDto😉
@TeddySmithDev
@TeddySmithDev 9 ай бұрын
😂
@kvelez
@kvelez 8 ай бұрын
Pro.
@matthewkk5087
@matthewkk5087 2 ай бұрын
you make your videos hard using mappers, its not begginers approach. u better make mappers and dtos when you create crud functionality, thats my opinion.
@antoniofuller2331
@antoniofuller2331 2 ай бұрын
The comments are getting less and less as the series go on
@irondesagitario
@irondesagitario 24 күн бұрын
That's common. The longer it goes, more people lose interest or find it too difficult to continue.
ASP.NET Core Web API .NET 8 2024 - 7. PUT (Update)
9:27
Teddy Smith
Рет қаралды 23 М.
ASP.NET Core Web API - 6. GET & Read Methods [PART 1]
36:24
Teddy Smith
Рет қаралды 66 М.
Caleb Pressley Shows TSA How It’s Done
0:28
Barstool Sports
Рет қаралды 60 МЛН
Ozoda - Alamlar (Official Video 2023)
6:22
Ozoda Official
Рет қаралды 10 МЛН
Ful Video ☝🏻☝🏻☝🏻
1:01
Arkeolog
Рет қаралды 14 МЛН
Brutally honest advice for new .NET Web Developers
7:19
Ed Andersen
Рет қаралды 293 М.
I built 10 web apps... with 10 different languages
14:23
Fireship
Рет қаралды 1,7 МЛН
ASP.NET Core Web API .NET 8 2024 - 5. DTOs
8:27
Teddy Smith
Рет қаралды 43 М.
"Stop Using Automapper in .NET!" - Code Cop #001
9:57
Nick Chapsas
Рет қаралды 116 М.
Swagger is Gone in .NET 9! Replace It With This.
9:34
Nick Chapsas
Рет қаралды 89 М.
ASP.NET Core Web API .NET 8 2024 - 9. Async/Await
9:03
Teddy Smith
Рет қаралды 25 М.
Updating my personal website from .NET 6 to .NET 8 LTS in 15 min
17:13
Scott Hanselman
Рет қаралды 17 М.
Do NOT Learn Kubernetes Without Knowing These Concepts...
13:01
Travis Media
Рет қаралды 338 М.
Caleb Pressley Shows TSA How It’s Done
0:28
Barstool Sports
Рет қаралды 60 МЛН