ASP.NET Core Web API .NET 8 2024 - 6. POST (Create) Github repo for this project: github.com/teddysmithdev/FinS... Twitter: / teddysmithdev Github: github.com/teddysmithdev Linkedin: / teddy-smith-015ba61a3
Пікірлер: 22
@johnconnor97874 ай бұрын
Nice course. Great explanation
@atheri0_n4 ай бұрын
Bro, you are a LIFESAVER
@Khal_Rheg0Ай бұрын
Thank you!
@dyakosekanyan1672Ай бұрын
Thank you, my Bro
@aldkdenedik24514 ай бұрын
Nice course
@eatersdaily2 ай бұрын
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?
@Khal_Rheg0Ай бұрын
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.
@Hamza-ky8us4 ай бұрын
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Ай бұрын
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`.
@shafialanower38205 ай бұрын
From your experience do you enjoy MVC or ASP.Core more? I’m relatively new didn’t know they stopped updating MVC
@TeddySmithDev5 ай бұрын
I would say .NET core API. You don’t have to worry about the front end.
@tod.photowalk2 ай бұрын
Very nice Thank you for the best practice and I have a question please. What is this theme.
@TeddySmithDev2 ай бұрын
Night Owl + Material Icons
@tod.photowalk2 ай бұрын
@@TeddySmithDev Thank you very much.
@seyolas358811 күн бұрын
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.
@kvelez2 ай бұрын
Pro.
@wolfgangdiemer25112 ай бұрын
Nice video, but it hurts a little, that you didn't change the mapper method name ToStockFromCreateDto😉
@TeddySmithDev2 ай бұрын
😂
@renatyrn5 ай бұрын
The great course so far. Why the id of the created stock so different from others? You ain't handle this moment in code.
@mischief94994 ай бұрын
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.
@mischief94993 ай бұрын
@@moodycat12 honestly dont know, i only guessed the reasoning behind why the row numbers are so different