0
하나의 목록에 데이터를 반환하는 두 개의 테이블 "CategoryGroup"및 "Category"가 있습니다. 요구 사항은 플랫 목록을 관련 카테고리를 포함하는 CategoryGroup과 같은 계층 구조 목록으로 변환하는 것입니다.평면을 계층 구조 목록으로 변환 하시겠습니까?
hieararchy리스트로 변환하는 방법을 제안하세요?
public class ProfileConditionGroup
{
public Guid ConditionGroupGUID { get; set; }
public string ConditionGroupName { get; set; }
public List<ProfileConditionList> profileConditions { get; set; }
}
public class ProfileConditionList
{
public string ConditionName { get; set; }
public Nullable<Guid> ConditionGUID { get; set; }
public string[] ThisConditionSelectedByProfileIDs { get; set; }
public Nullable<Guid> ParentConditionGroupGUID { get; set; }
public bool IsDefaultSelected { get; set; }
}
'items.GroupBy (X => x.CategoryGroup)를'? – fubo
두 테이블에 대해 C#의 클래스 정의를 제공하십시오. – Enigmativity
@Enigmativity : 게시물이 업데이트되었습니다. – Supreet