Last active
February 22, 2018 07:02
-
-
Save HamidMosalla/2dc3efe00a20497d5a88704bb59dd604 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Cate | |
{ | |
public int Id { get; set; } | |
public int? ParentId { get; set; } | |
public string Name { get; set; } | |
} | |
var cats = new List<Cate> | |
{ | |
new Cate { | |
Id = 1, ParentId = null, Name = "First" | |
}, new Cate { | |
Id = 2, ParentId = null, Name = "Second" | |
}, new Cate { | |
Id = 3, ParentId = null, Name = "Thrid" | |
}, new Cate { | |
Id = 4, ParentId = null, Name = "Fourth" | |
}, new Cate { | |
Id = 5, ParentId = 4, Name = "SubFourth1" | |
}, new Cate { | |
Id = 6, ParentId = 4, Name = "SubFourth2" | |
}, new Cate { | |
Id = 7, ParentId = 5, Name = "Sub_SubFourth1" | |
}, new Cate { | |
Id = 8, ParentId = null, Name = "Sixth" | |
}, new Cate { | |
Id = 9, ParentId = null, Name = "Seventh" | |
}, new Cate { | |
Id = 10, ParentId = 9, Name = "SubSeventh1" | |
}, new Cate { | |
Id = 11, ParentId = 9, Name = "SubSeventh2" | |
}, new Cate { | |
Id = 12, ParentId = null, Name = "Eighth" | |
}, new Cate { | |
Id = 13, ParentId = null, Name = "Ninth" | |
}, new Cate { | |
Id = 14, ParentId = null, Name = "Tenth" | |
}, new Cate { | |
Id = 15, ParentId = null, Name = "Eleventh" | |
}, new Cate { | |
Id = 16, ParentId = 15, Name = "SubEleventh" | |
}, new Cate { | |
Id = 17, ParentId = 16, Name = "Sub_SubEleventh" | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment