내가 배운 한 IRepository에는 CRUD. 그리고 우리는 이것을 상속 IRepository과 같은 우리의 다른 인터페이스에 IProduct구현할 IProduct구체적인 클래스 ProductRepository와 같은 방법과를, GetAllProducts(), Top5Products().
n- 계층 아키텍처에서도 동일한 작업을 수행 할 수 있습니다. 같은, 생성 DAL Class Library과에서 클래스 정의 Product와 같은 방법과를 GetAllProducts(), Top5Products().
모두 DAL.Product와 Repo.ProductRepository우리는 초기화 클래스 DB Context의 Entity Framework우리의 관련 데이터를 쿼리합니다.
호출은 둘 다 Repo.ProductRepository또는 DAL.Product방법에서 비슷 합니다.BLL
이러한 유사점을 고려할 때 Repos의 이점은 무엇입니까? 내가 함께 n 계층 아키텍처를 사용하여 매우 쉽게 같은 작업을 수행 할 수 있습니다 ( Controller, BLL Class Library, DAL Class Library).