I have a very large data set (1,000,000+ customers) in a data set on a remote computer. This data is stored in a flat file, and looked up by customer number, which is the offset into the file. I want to provide oData access to this collection, but I only want to offer the ability to read a single entity.
Permissions-wise it's easy to get WCF to restrict it to single reads with the following:
config.SetEntitySetAccessRule("Customer", EntitySetRights.ReadSingle);
The problem I have is that I am forced to return an IQueryable interface which seems to require that I gather the whole dataset. Is there something I'm missing, or is there a way to only gather the records required when evaluating the IQueryable, which I know (due to oData permissions) will require a single record fetch?