I’m looking for good tutorials on how to create LINQ accessors/APIs to my business classes. So that someone could eventually enter something like this in a program–
var potentialCustomers = from people in county
where people.NumberOfCats > 2
select people
I’ve used LINQ often enough with the .Net collections, but have never done it before on my own classes. Is it just a matter of implementing IEnumerable, or are there additional steps needed?
You just need to implement IEnumerable interface in your class and then you can use LINQ.
Because LINQ is a set of extensions for
IEnumerableobjects