اشتراکها
How you shouldn’t implement base classes
public class Entity<T> { public T Id { get; protected set; } }
Motivation for such code it pretty clear: you have a base class that can be reused across multiple projects. For instance, if there is a web application with GUID Id columns in the database and a desktop app with integer Ids, it might seem a good idea to have the same class for both of them. In fact, this approach introduces accidental complexity because of premature generalization.
There is no need in using a single base entity class for more than one project or bounded context. Each domain has its unique path, so let it grow independently. Just copy and paste the base entity class to a new project and specify the exact type that will be used for the Id property.
اشتراکها
طراحی برای خوانایی بهتر در صفحات وب
اشتراکها
طراحی الگو - Solid design pattern
اشتراکها
الگوهای طراحی در Typescript
اشتراکها
مجموعه Awesome Domain-Driven Design
اشتراکها
Zoom کردن بر روی تصویر پس زمینه
اشتراکها