hung-doan / .bookmarks

My life bookmarker
0 stars 0 forks source link

Repository Pattern #51

Open hung-doan opened 6 years ago

hung-doan commented 6 years ago
  1. What is Repository Pattern ?
  2. What is the difference between Repository vs DAO?
  3. Should I use Repository when using an ORM (EntityFramework,..). EF already implement Repository, if We apply Repositoty in front of EF, It's about the abstraction of an abstraction. Is that bad?
  4. Should Repository return a ViewModel or DTO (data transfer object)
  5. Some blogs told GenericRepository is an anti-pattern, is that true? Generic Repository (Repository) vs Specific Repository (CustomerRepository), which one is better?
  6. Complex query, Repository & Specification Pattern.
  7. Which layer Repository should belong to? 7.1 In N-Layer & Service Layer pattern (Presentation <-> SericeLayer<->DataAccess): Repository will be in DataAccess Layer or in ServiceLayer? 7.2 In DDD (Presentation <-> ApplicationLayer<->DomainLayer): Repository will be in DomainLayer or in the ApplicationLayer ?

  1. Benefit of Repository