What Is An Entity? | Domain-Driven Design, Clean Architecture, .NET 6

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

Domain-Driven Design is a software design methodology coined by Eric Evans in his book "Domain-Driven Design: Tackling Complexity at the Heart of Software? In his book, he introduces the concept of an entity. In this video, I will discuss what an entity is in Domain-Driven Design terms. I will also show you how to implement an entity base class that you can use in your projects.

Join my weekly .NET newsletter:

Subscribe for more:

Chapters
0:00 What is an Entity
1:06 Entity base class
3:19 When are two Entities equal
7:48 Using the Entity base class
9:21 Outro (and stay awesome)
Рекомендации по теме
Комментарии
Автор

Have to admit this CA&DDD series is fantastic! Very well explained step by step with logical explanation and why something is a good practice. I started to like DDD just by watching your videos. Thank you Milan! 👏💪

armanbecirovic
Автор

I'm glad i found your channel. I hate all these "beginner" or standard videos where they always show code that would never be in production but this is some quality stuff thanks 💯

flobuilds
Автор

Your monolog with these is excellent and demonstrates a masterful command of both English and the rest of this stuff.

nicholasslodki
Автор

Nice video, Milan. Your videos are awesome because you keep it simple and go over from basic to advance concepts. Love this format. Keep it up!!!

sushilb
Автор

you've got a great way of explaining things. I'm by no means a beginner anymore but your videos are always a great refresher, I really appreciate your effort with these

chrismingay
Автор

I love the simplicity of following YAGNI principle for your example. Many books and examples throw you a lot of boilerplate code that may not be necessary when learning DDD techniques. Thanks for sharing.

kinggrizzly
Автор

Your videos are so informative, thank you!

ipelengmekgwe
Автор

You cheeky boy putting this out today rather than tomorrow. 😉Great job Milan!

nickolaki
Автор

Awesome Milan! I see you on Twitter often but not YouTube

TheEamonKeane
Автор

Awesome! Keep 'em coming. I see people using like an aggregate root to define the entity id

ugochukwuumerie
Автор

I am very happy to find this channel and the explanations are clear and precise and I look forward to the next videos.
A big thank-you.
Just a question M Milab: How do you choose the naming of the folders and what they should contain, for example the primitive folder?

tidianediallo
Автор

Great content and didactic Milan, congrats!

Could I suggest a Builder creational pattern in case of complex Entity.

Next video will be Object Value :) ?

Best regards

aseneda
Автор

3:10 This might be late, but as long as you only initialize it in the constructor you don't even need a setter. `public Guid Id { get; }` is enough.

modernkennnern
Автор

Hi Milan, really great information here! Just one question when you implement the Equal(Entity? other) method. Since you already have the Equal(object? obj) method, can't you utilize this when you create the Equal(Entity? other) as well? Something like this " public bool Equals(Entity? other)
{
return Equals(other);
}". I want to know if this is the same or I am missing something. Thank again for your work!

huynhtriet
Автор

Great video, a small heads-up nevertheless:
Using Guids directly for ids may be considered as a primitive type obsession... You're setting the fundamentals and you didn't talk about value objects yet, but I think this should be mentioned because It will affect your base Entity implémentation.
I think PTO is a key concept if we're doing DDD soo that's just my thoughts.

anthonytrad
Автор

How would this approach change if you are using strongly typed IDs for your entities. Would you still need this base Entity functionality?

dandoescode
Автор

Good work! MIlan, Continue please! However, I have a question. What is your thought process behind naming the folder 'Primitives'?

tanvirarjel
Автор

Hello, Milan,
You made your Gathering class as sealed. My sonarsource tells me of a bad smell RSPEC-4035 Tells me - Classes implementing "IEquatable<T>" should be sealed
Is it okay if I remove sealed because I need to have inheritance?
And I also don't get if a "domain layer" can have an interface folder for interfaces for entities. Example: I've got hierarchy: BaseMaterial -> Material, PackMaterial and all of them implement IMaterial interface in which I guarantee that all classes that implement it have some fields and some methods I expect them to have.

MrKlyushin
Автор

Братан, хорош, давай, давай, вперёд! Контент в кайф, можно ещё? Вообще красавчик! Можно вот этого вот почаще?

Yosso
Автор

Hi Milan, what is the logic by multiplying the GetHasCode method by a prime number?

ujuzitek