Hi all,
in Pattern in Action 4.0 the repository was in Presentation Layer, and it used to call WCF Service.
In Pattern in Action 4.5 i move the repository in Service Layer to interact with DataLayer, i want ask if this a best practice or i'm making an error.
I found this comment in source code of Service Implementation: Service could be split up in individual Repositories: Product, Category, etc...
Ok supposed, i create a ProductRepository, in ShopController in overloaded 'injectable' constructor i add this code:
IService service { get; set; }
ActionService.IProductRepository productService { get; set; }
public ShopController() : this(new Service(), new ActionService.ProcuctRepository()) { }
It is a good practice?
Can you provide me an example ?
Thank you in advantage!