Last active
April 2, 2016 02:33
-
-
Save kleberksms/32ba9f99ba6dabacf154b7de19bb3c15 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
var list = new List<Example>{ | |
new Example{ | |
Id = 1, | |
Description = "First Level", | |
Type = 4, | |
ParentId = 0 | |
}, | |
new Example{ | |
Id = 2, | |
Description = "Second Level", | |
Type = 3, | |
ParentId = 1 | |
}, | |
new Example{ | |
Id = 3, | |
Description = "Third Level", | |
Type = 2, | |
ParentId = 2 | |
}, | |
new Example{ | |
Id = 4, | |
Description = "Last Level", | |
Type = 1, | |
ParentId = 3 | |
}, | |
new Example{ | |
Id = 5, | |
Description = "First Level", | |
Type = 4, | |
ParentId = 0 | |
}, | |
new Example{ | |
Id = 6, | |
Description = "Second Level", | |
Type = 3, | |
ParentId = 5 | |
}, | |
new Example{ | |
Id = 7, | |
Description = "Third Level", | |
Type = 2, | |
ParentId = 6 | |
} | |
} | |
Condition => where(c => c.Type = 1) | |
Expected Result (Array or list result) | |
[ | |
{ | |
Id = 4, | |
Description = "Last Level", | |
Type = 1, | |
ParentId = 3 | |
}, | |
{ | |
Id = 3, | |
Description = "Third Level", | |
Type = 2, | |
ParentId = 2 | |
}, | |
{ | |
Id = 2, | |
Description = "Second Level", | |
Type = 3, | |
ParentId = 1 | |
}, | |
{ | |
Id = 1, | |
Description = "First Level", | |
Type = 4, | |
ParentId = 0 | |
} | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Cara blz
Eu estou fazendo algo deste genero veja se ajuda...