Hi,
I have a
List<data>
which i am trying to loop and pass it to some function.
IEnumerable<EntityObject> Data = entity.get();
LstAll = new Employee();
foreach (EntityObject o in Data)
{
Employee e = new Employee();
DeleteData(0,e);
LstAll.Add(e);
}
now i want to use lamba expression so that i can remove the Foreach loop and call the DeleteData.
LstAll.Add(from o in Data
let c = DeleteData(o,Employee e));
This code is giving me error.
Any suggestion Plz help.
[Edit: Code block added]