Within EF4, it's pretty easy to map a stored procedure into an entity. I create the stored proc, Add it to the model, then do a Function Import and specify the parent entity.
Now, the rub comes in that I want my stored proc to do "eager loading" of the children entities.
In effect, I have a table Parents and a table Children, with a one to many relationship between them. I'd like my stored proc to return all Parents that match a criteria and all Children of those parents, distributed into the entity model as one would imagine.
How is this accomplished?