c# - Generalizing a Fetch() function for data sources -


I have a repository that should suit itself to any type of data source. It includes some special types of web services, databases (using ActiveRecord and NHibernate) and even flat files. I have a IEnumerable for ActiveRecord as I need but the interface is inappropriate. Is it okay? How do I use it?
Can I use it to enhance my Lao () function to accept other feature sources?
Can I wrap it with my own class to accept other data sources?

I will use IQueryable as an abstract instead. Implement the IQueryable to your IRPository, then the ActiveRecord repository will be assigned to Castle.ActiveRecord.Linq, the flat file repository will be implemented using LINQ from XML etc.


Comments