Right Skafa. I saw a lot IReposity<T> that are really IDao<T> ...but you know... IReposity<T> has another fashion meaning ;)
2009/6/18 Skafa <[email protected]> > > If you use a 'repository' to abstract away your persistence > technology, it really is a Data Access Object. > > The definition of a repository is: 'Mediates between the domain and > data mapping layers using a collection-like interface for accessing > domain objects.' (fowler) > > note the 'collection-like'. > > The definition of a DAO is: a data access object (DAO) is an object > that provides an abstract interface to some type of database or > persistence mechanism, providing some specific operations without > exposing details of the database. (wikipedia) > > So the 'repository' in the above example really is a DAO... > > It's just a naming issue, but do to this 'repository' hype, people > have lost the real meaning of what a repository does. (ayende has some > posts about it too). > > > > > On 18 jun, 06:29, Paul Batum <[email protected]> wrote: > > Today I read Fabio's post on how he sees little sense in combining non- > > generic repositories with LINQ: > > > > http://fabiomaulo.blogspot.com/2009/06/linq-and-repository.html > > > > I was hoping to have a discussion about this. Basically, I don't > > really understand where Fabio is coming from. If I have this > > interface: > > > > public interface ICustomerRepository > > { > > Customer GetCustomerById(string id); > > IEnumerable<Customer> FindByName(string name); > > void AddCustomer(Customer customer); > > > > } > > > > Then I have some options in regards to the implementation for > > FindByName. I could use the criteria API, I could use HQL, and I could > > use LINQ. There are probably some other options that I am forgetting, > > but I think its fair to say that these are the three major options. > > > > I'm a big fan of LINQ. I think its great that developers can learn one > > common query language and apply it to different datasources. I see > > LINQ2NH eventually replacing HQL and the criteria API in 90% of cases. > > I don't understand why using LINQ to implement the FindByName method > > is inappropriate. Could Fabio or someone else that understands his > > point of view elaborate on this further? > > > > Thanks! > > > > Paul Batum > > > -- Fabio Maulo --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nhusers?hl=en -~----------~----~----~----~------~----~------~--~---
