public EdmEntityObjectCollection Get() { string dsName = Request.GetDataSource(); var ds = DataSourceProvider.GetDataSource(dsName); var options = BuildQueryOptions(); EdmEntityObjectCollection rtv = null; if (options.SelectExpand != null) { Request.ODataFeature().SelectExpandClause = options.SelectExpand.SelectExpandClause; } GetResult getResult = ds.Get(options); rtv = getResult.Collection; if (options.Count != null && options.Count.Value) { Request.ODataFeature().TotalCount = getResult.Count; } return(rtv); }