public static void MapUpdateDTO(this Domain.Entities.Label label, LabelUpdateDTO dto) { label.Name = dto.Name; if (dto.Description != null) { label.Description = dto.Description; } if (dto.Color != null) { label.Color = dto.Color.Value; } }
public static LabelReadDTO ToReadDTO(this Domain.Entities.Label label) => new LabelReadDTO(label.Id, label.Name, label.Description, label.Color);