Well I think what Ken's saying is that there are very few cases in which you want to do a straight FindAll. Chances are you're going to want to bring back a subset of all the data such as a page of 20 products or products in a particular category, something like that. So it'll depend on your application.
On Mon, Jan 26, 2009 at 2:13 PM, Mark Jensen <don...@gmail.com> wrote: > > :) > > so you would also do something like the example from the link shows, > but just remove the "FindAll" ? > > On Jan 26, 12:20 pm, Ken Egozi <egoz...@gmail.com> wrote: > > my take: > > externally the domain API will expose specialised repositories for > aggregate > > roots. (not all of them should have Save, and a generic FindAll is not > > informative imo) > > internally, in the repository implementations, they'd use ARMediator (or > NH > > queries) to retrieve manipulate data > > > > > > > > On Mon, Jan 26, 2009 at 1:08 PM, Colin Ramsay <colinram...@gmail.com> > wrote: > > > Well you wouldn't necessarily have to make a repo for every entity > because > > > you'd have a generic Repo<T> you could use. However you might create > (as an > > > example) a UserRepo : BaseRepo<User> with a FindByUsername method as a > > > little syntactic sugar. > > > > > I think many people would use a container such as windsor to avoid > having > > > to manually instantiate their repositories. > > > > > On Mon, Jan 26, 2009 at 11:02 AM, Mark Jensen <don...@gmail.com> > wrote: > > > > >> Hi > > > > >> From what i can read on the internet people do really like this > > >> combination due to the placement of the persitance logic. > > > > >> how ever, i know that Castles AR has something callsed > > >> ActiveRecordMediator which seems to be the solution to the problem > > >> above. (i also know ayendes rhino commons which also have an > > >> implementation of the repository pattern). > > > > >> The questions are. > > > > >> 1. Will i lose something if i stop inheritting from ActiveRecordBase > > >> and use ActiveRecordMediatior instead? (to me it seems like i will get > > >> a lot more functionality/control) > > > > >> 2. Can someone me how to implement the Repository pattern with > > >> ActiveRecordMediator. I have found this example here > > > > >>http://www.lostechies.com/blogs/johnteague/archive/2008/05/27/using-d. > .. > > > > >> but to me it seems like I would have to make a Repository (and inherit > > >> from BaseRepository) for every Aggregate and then I need to > > >> instantiate the Repository it when i want to use it. > > > > >> Is there a better way of doing this? > > > > >> :) > > > > >> best regards, > > >> Mark > > > > -- > > Ken Egozi. > http://www.kenegozi.com/bloghttp://www.delver.comhttp://www.musicglue.comhttp://www.castleproject.orghttp://www.gotfriends.co.il > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Castle Project Users" group. To post to this group, send email to castle-project-users@googlegroups.com To unsubscribe from this group, send email to castle-project-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/castle-project-users?hl=en -~----------~----~----~----~------~----~------~--~---