I\'d like to expose a Repository as an \'IQueryable\' type.
The repository uses Linq to NHibernate to communicate with the database.
Can anyone point me at an ex
I think a Repository can give you 1 or more IQueryables/IEnumerables, but not : a Repository is an IQueryable.
It could look like:
public interface IPersonRepository
{
IEnumerable GetAllPersons();
void AddPerson(Person person);
// more...
}
You could return IQeryable
from GetAllPerson() but that may not be an improvement. IEnumerable is simpler, less coupling.