One of the tedious jobs in business object is parsing and searching object collections. For instance consider the below figure where we want to search a country by an ‘ID’ value. So what we do is loop through the collection and get the object. Many may argue how about keeping a key in List or Array. The below example is just a sample. For instance if you want to search using country code and name, list / collection keys will not work with those multi-value searches.
In other words using LINQ we can query business object collections and filter the collection in a single LINQ query.
Asked In: Many Interviews |