Example #1
0
        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;
            }
        }
Example #2
0
 public static LabelReadDTO ToReadDTO(this Domain.Entities.Label label) =>
 new LabelReadDTO(label.Id, label.Name, label.Description, label.Color);