Hi folks,
I'm a big fan of using the Repository pattern
to return IQueryable<T>
objects. I then let my services layer determine what does what (eg. filter by XXX, order by YYY, project into ABCD, etc).
But I've got some hardcore DB stuff, so I've got it all wrapped up into a Stored Procedure
. Works fine. I know EF can execute stored procs .. but I'm not sure how this fits into a Repository Pattern data layer.
Does anyone have any examples / suggestions? Do i let the repository method execute the stored procedure, and then i return the result (eg. ICollection<Foo> as AsQueryable
.. so the service layer then just queries on that result?