It can select operators for each user and I want to check whether the input is valid or not
Here is my expected result:
level | user | operator
1 | A | -
2 | B | AND
2 | C | AND
2 | D | -
3 | E | -
Validation rule
1. the operator must be "-" when there is 1 record in the same level
2. If there is more than 1 record in the same level, the operator must be "-" on the last record and it must select "AND"/ "OR" on other records
How to validate it using LINQ and C#?