@* For more information on enabling MVC for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860 暂时未使用 *@ @{ @model List; int root = int.Parse(ViewData["ROOT"].ToString()); var data = Model.Where(x => x.PARENT_ID == root); } @if (data != null) { foreach (var item in data) {

@item.HOTEL_GROUP_ID @item.HOTEL_GROUP_NAME

@if (Model.FirstOrDefault(x => x.PARENT_ID == item.HOTEL_GROUP_ID) != null) {
}
@if (Model.FirstOrDefault(x => x.PARENT_ID == item.HOTEL_GROUP_ID) != null) {

@(ViewData["ROOT"] = @item.HOTEL_GROUP_ID)

@await Html.PartialAsync("~/Views/Shared/_Index.cshtml",Model,ViewData)
}
} }