예제 #1
0
 private Category(CategoryDomainDto categoryDomainDto)
 {
     Name = categoryDomainDto.Name;
     if (categoryDomainDto.RelatedCategories != null && categoryDomainDto.RelatedCategories.Any())
     {
         RelatedCategories = categoryDomainDto.RelatedCategories.Select(Load);
     }
     if (categoryDomainDto.SubCategory != null)
     {
         SubCategory = Load(categoryDomainDto.SubCategory);
     }
 }
예제 #2
0
 public static Category Load(CategoryDomainDto categoryDomainDto)
 {
     return(new Category(categoryDomainDto));
 }