Each Linq expression must have a
[__u__]from ... in ... select ...;
Your example data is incomplete or maybe wrong. You talk about
but this is nowhere visible in your code.
seems to be a list (you call
in the loop), but initialization is by a single element (
is not likely to be a list, right?).
Please revise your question and carefully check the code in the question so it exactly matches what you have in your homework assignment.
PS: What does
doing? If it removes some item from the list it loops over, the program is broken.
PPS: If the problem is to add a range of elements to a list, then use the
PPPS: Is this a typo or don't you understand where to use/don't use type names (see
LstAll.AddRange(from o in Data let c = DeleteData(o,
Employee e) ... select ...);
or is it rather the following?
LstAll.AddRange(from o in Data let c = DeleteData(o, new Employee()) ... select ...);