Question

I've got a value type called "Product Type" that is assigned to a product. (A product has one product type)

To allow the user to select the type from a list, I'm going to fill a dropdown. Where is it most appropriate to retrieve the list of product types? A class implementing a repository pattern?

Edit: Clarified by changing product code to product type. A product type is something like "DVD"/"CD"/"Blu Ray"/etc.

Was it helpful?

Solution

Product seems to be aggregate root, so list of product types should be in ProductRepository.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top