나는 POCO 클래스를 10 개했습니다. IRespoitory 인터페이스 및 UnitOf 작업 클래스와 함께 작업 단위 (UOW)와 함께 간단한 저장소 패턴을 사용하고 있습니다.단위 작업 관련 저장소
모든 IRepository를 단일 UnitOfWork 인스턴스에 넣는 것이 맞습니까 (보통)? 즉
: 10 POCO 클래스 - IRepository 10 예 - 하나의 UnitOfWork 클래스 모두 10 저장소
UnitOfWork
{
IRepository<Customer> CustomerRepository {get; set;}
IRepository<Customer> CustomerRepository {get; set;}
IRepository<Customer> CustomerRepository {get; set;}
// the same for all others 7 POCo class
// ..other stff
}