Mapping Validation Attributes From Domain Entity to DTO

前端 未结 8 2235
轮回少年
轮回少年 2020-12-13 02:21

I have a standard Domain Layer entity:

public class Product
{
    public int Id { get; set; }

    public string Name { get; set; }

    public decimal Price         


        
8条回答
  •  无人及你
    2020-12-13 03:03

    If you use hand-written domain entities, why not put your domain entities in their own assembly and use that same assembly both on the client and server. You can reuse the same validations.

提交回复
热议问题