❔ Filter list with lambda expression?
Hello! Right now I have a "MyList = blahaRepo.GetAllUsers();" which retrieves all users.
Instead of creating a separate method for retrieving users with a specific flag or creating a new list and run a foreach and add those with the specific flag to the new list - Can I simply use a lambda expression along with the line above to filter out while filling the first list? Or is there a better way to filter out the data?
Instead of creating a separate method for retrieving users with a specific flag or creating a new list and run a foreach and add those with the specific flag to the new list - Can I simply use a lambda expression along with the line above to filter out while filling the first list? Or is there a better way to filter out the data?
