Last post Nov 06, 2013 06:58 AM by PatriceSc
Nov 06, 2013 06:39 AM|vishnuRocky|LINK
i want to konw that how we can implements ienumerable and iqueryable in c#
Nov 06, 2013 06:57 AM|akhilrajau|LINK
read the following threads / articles
Nov 06, 2013 06:58 AM|PatriceSc|LINK
http://msdn.microsoft.com/en-us/library/system.linq.iqueryable(v=vs.110).aspx (or their generic version).
Basically these are "interfaces" that is a contract that provides a way to enumerate data or to query data. More likely you are seeing this in the context of Linq ? For example you could expose a result using IEnumerable<T> if your intent is to expose this
particular result set or you could expose this as IQueryable<T> if you want rather to expose a query and let the consumer to possibly alter this query before running it.
Usually you don't implement this yourself. I would strongly suggest to explain rather your overall goal. Do you use Entity framework ?