Binding Responses to UI Controls Using LINQ

Use Language-Integrated Query (LINQ) to bind a response to a UI control.


LINQ allows you to manipulate the ODataEntitySet, and write complex filters. See published on non-SAP site.


Use LINQ to filter the ODataEntitySet (using either lambda expression or SQL), then display the results:
// LINQ extension method using the lambda style
var filteredEntitySet = entitySet.Where(e => ((string)e.Properties["Address/State"].Value) == "WA");

// LINQ extension method using the SQL style
var filteredEntitySet = from e in entitySet
where ((string)e.Properties["Address/State"].Value) == "WA"
                        select e;

foreach (var e in filteredEntitySet)