Hi
If ObjectDataSource.SelectMethod = A and if A() returns a single object of type O, then this object is wrapped in a one element IEnumerable collection and returned by the ODS.Select method
Thus, assuming ODS.SelectMethod points to method A(), then if A() returns a null , when called by ODS, this null is ( I assume ) wrapped into one element IEnumerable collection and no exception is thrown. Similarly, if ODS.SelectMethod points to method B(), which returns a list of objects, and if B() returns an empty collection when called by ODS, then no exception is thrown.
But if a method would instead return ( when called by ODS.Select ) an empty string collection (string[]), then I’d get exception “The data source for GridView did not have any properties or attributes from which to generate columns”. How is empty string collection any different from other empty collections, which don’t cause an exception?
Thanx