WOW ! ! ! Feedbacks! You are really REALLY wellcome! :-D
In that chapter I talk about the limits of two mainstream approaches:
- generic repositories that, by exposing a general purpose interface require out-of-bound comunications about which methods are safe to be called (for example Delete(T)).
- custom repositories that expose explicit strongly typed query methods bound to the needs of the clients
We choosed IQueryable<T> as it allows for strongly typed general purpose queries but as for creation and deletion the Epic's way is described later:
no repository should provide such methods, as they are always owned by a bounded role. Indeed there is always a user responsible for the creation or the elimination of an entity.
As for lazy loading, no, you never need it.
The key here is in
shared identifiers. The ancestors of Epic.Poem (the epic's component that will handle the presentation layer) proved that with a good presentation framework you can avoid lazy loading at all, what you need from different repositories with Linq.
The challenging point, however, is to build queryproviders that handle such requirements.
Indeed we have a few high skilled developers that are experts on the topic (as for me, I was one of the developers of the DbLinq project that produced the Mono's Linq provider).
In the last year we adopted Relinq, but while very good per se, I think that the Epic's approach would meet better the needs of the market we target (and would integrate better with the rest of the framework, particularly with Epic.Server).
Please let us know more questions and point. If something looks obscure, let us know!
Giacomo
PS: where are you from? As your name is Marco I was wondering if you are from Italy...