Controllers From Scratch Using .NET 8

  Рет қаралды 15,281

Amichai Mantinband

Amichai Mantinband

Күн бұрын

Пікірлер: 37
@denischarbonneau9302
@denischarbonneau9302 23 күн бұрын
Hi Amichai! The playlist is out of order :) Playing videos that are dependant of another, before the dependency etc. Ex.: this video you call it number 5 - but in the playlist, is is #9
@aweklin
@aweklin 5 ай бұрын
In my opinion, this is the definition or bedrock of clean code. Great job Amichai!
@musazulu7013
@musazulu7013 5 ай бұрын
Thanks Amichai i was waiting patiently for a new video
@fishzebra
@fishzebra 5 ай бұрын
Great concise talk. Should you validate against Empty Guids? and when should i use Cancellation tokens?
@nonlinearsound-001
@nonlinearsound-001 5 ай бұрын
Thanks so much, Amichai! This actually helps visualizing and understanding all the goodies, the .NET team build into their framework! More, please :) Two questions: 1) How would you connect this API to a database layer, let's say, using maybe Npgsql by using a DBContext and maybe without using an EntityFramework variant? A video like that would be tremendously helpful! 2) Would you create a separate project for the presentation layer using Blazor and alike or would you incorporate it into this project?
@smliwhcirdeirf
@smliwhcirdeirf 5 ай бұрын
Best regards from Germany. Why don't you use Mapster anymore? Are mapper libraries no longer in fashion?
@NoTarantino
@NoTarantino 3 ай бұрын
Hi I am trying to learn dotnet. Think you are a great at giving explanations. But it would have be great to have links to repos for each lesson. I get stressed out not knowing if it will build or not. It can be a bit unclear of were you are watch list etc. Your videos probably have different setting and different versions.
@NoTarantino
@NoTarantino 3 ай бұрын
Ah the playlist was in reverted order😅
@unhandledexception1948
@unhandledexception1948 4 ай бұрын
awesome video... noticed your usage of request / response as the API level model... should we think of those as DTOs or is there ever a case where there is another layer that handles DTO before reaching the domain ?
@imranmokashi9101
@imranmokashi9101 2 ай бұрын
What would be the right place or folder or class to write FromDomain methods for internal and external representation?
@10Totti
@10Totti 5 ай бұрын
Best Tutorial Thanks!
@Mig440
@Mig440 5 ай бұрын
I would avoid void methods like the plague here. External concerns like mapping to a database representation is not a use case but a side effect that should happen as far away as possible from business logic.
@Mig440
@Mig440 5 ай бұрын
Business logic should be side effect free, such that it can be reused in other entry points where you might not want the side effect to happen. This provides better decoupling of concerns IMHO
@harrisonwell1719
@harrisonwell1719 4 ай бұрын
If I’m using mapster should I still do the mapping in record class
@uzayrsyed6293
@uzayrsyed6293 5 ай бұрын
There's a new extensions feature in .NET 9 and I was thinking this would make it possible to add a contructor/factory method to the domain object, 'Product' in this case, that takes the request record 'CreateProductRequest' and returns the domain object
@_OsamaAmir
@_OsamaAmir 5 ай бұрын
what purpose did the record serve, I mean I could just use the domain object for request or response mapping and why didn't you separate them out, I mean does it make sense to place them in the controller class if you can elaborate that would be of great help and good content btw I certainly needed it
@amantinband
@amantinband 5 ай бұрын
Exactly what we’ll be talking about in the next video (presentation logic vs application logic vs domain logic)
@tchial0
@tchial0 5 ай бұрын
Hahahaha! The silence was broken.
@imaginative-monkey
@imaginative-monkey 5 ай бұрын
For any give domain model Xxx, is it always necessary to create 2 XxxRequest and XxxResponse DTOs, even if they're exact matches? Thanks! 👍
@BeekuBird
@BeekuBird 4 ай бұрын
I haven't watched the video yet, but the practice of having external DTOs is to avoid coupling. Additionally, DDD has a task based approach. Request and response should follow requirements of the task based interface. Vladimir Khorikov put a lot of effort into explaining this.
@ekekw930
@ekekw930 5 ай бұрын
Please implement VSA
@amantinband
@amantinband 5 ай бұрын
It's. in my backlog for a while. I'll likely end up taking this project and showing how to refactor it to VSA sometime down the road (unlikely in the next 3 months though)
@ekekw930
@ekekw930 5 ай бұрын
@@amantinband Cannot wait! Loving your content
@margosdesarian
@margosdesarian 5 ай бұрын
What if the Service is not going to store/create the product (for example because it has a duplicate ISBN number or something) - surely the service needs to signify back to the calling code (and to the consumer of the controller method) that the creation has failed and also why it has failed? How would you adapt your pattern to handle that? Do you have a standardised approach for that?
@amantinband
@amantinband 5 ай бұрын
We’ll cover error handing and global error handling in a few videos
@petrmalecik5661
@petrmalecik5661 5 ай бұрын
Hello Amichai, nice video I liked It :) Just one question why are you using controllers over Minimal APIs and REPR pattern? Is there any technical reason for that or it is only a matter of taste?
@amantinband
@amantinband 5 ай бұрын
I haven't landed on a good structure that didn't involve a lot of boilerplate, and was overall simpler than starting with controllers
@petrmalecik5661
@petrmalecik5661 5 ай бұрын
@@amantinband Okay, so If I understand correctly, you first start with controllers and later refactor to minimal APIs, if you feel like it would bring benefit?
@kinax2
@kinax2 4 ай бұрын
Controllers are almost dead, Minimal api is the next big thing :)
@bogdankhamelyuk3857
@bogdankhamelyuk3857 5 ай бұрын
sorry, but in previous video you didnt cover requests folder. Top video anyway!
@amantinband
@amantinband 5 ай бұрын
Thanks! This is the previous video ICYMI: kzbin.info/www/bejne/habRnGeNlNmnn6csi=iOUyS20KC8aEoT4X
@bogdankhamelyuk3857
@bogdankhamelyuk3857 5 ай бұрын
@@amantinband ah many thanks😇✋
@LarryGroot
@LarryGroot 5 ай бұрын
I like the concepts and structure. But please do it faster, speak faster and jump faster to different code locations. ;-)
@Tony-dp1rl
@Tony-dp1rl 5 ай бұрын
It is amazing how much repetitive code we still need to write. This reminds me of C# ten years ago. Has nothing improved?
@mehdi_aghaei_
@mehdi_aghaei_ 5 ай бұрын
As someone who follows your content for a while, expecting more advance videos this one was rather waste of time because if someone even start with ASP there is lots of content based on the same concept. Please consider more interesting topics like GRPC services or design related topics. Thank you
@amantinband
@amantinband 5 ай бұрын
This series is suitable for beginners as well and any project built from scratch will need controllers. In any case, the title + intro should give you a good overview of the upcoming content in no more than 20 seconds 🙂
Dockerize Your .NET Application in 5 Minutes!
7:42
Amichai Mantinband
Рет қаралды 16 М.
How To Design Amazing REST APIs
18:57
Amichai Mantinband
Рет қаралды 18 М.
風船をキャッチしろ!🎈 Balloon catch Challenges
00:57
はじめしゃちょー(hajime)
Рет қаралды 88 МЛН
This Game Is Wild...
00:19
MrBeast
Рет қаралды 133 МЛН
Global Error Handling in .NET 8 - My Favorite Approach
14:18
Amichai Mantinband
Рет қаралды 14 М.
Exceptions are evil. This is what I do instead.
24:41
Amichai Mantinband
Рет қаралды 21 М.
Every Single LINQ Extension Method With Examples | .NET & C# Essentials
42:28
What is gRPC and Why is it TAKING OVER? #grpc #backenddevelopment #systemdesign
17:10
The Best Way To Organize Your Program.cs In ASP.NET
6:59
Amichai Mantinband
Рет қаралды 18 М.
Getting Started with Dapper in .NET
11:29
Amichai Mantinband
Рет қаралды 14 М.
Forget Controllers and Minimal APIs in .NET!
14:07
Nick Chapsas
Рет қаралды 76 М.
Stop returning custom error responses from your API. Do this instead.
12:07
Amichai Mantinband
Рет қаралды 84 М.
Dependency Injection Deep Dive | .NET & C# Essentials
38:01
Amichai Mantinband
Рет қаралды 26 М.
風船をキャッチしろ!🎈 Balloon catch Challenges
00:57
はじめしゃちょー(hajime)
Рет қаралды 88 МЛН