public IEnumerable <ProductTypeViewDTO> GetWithTarget() { var types = _repo.GetWithTarget().Translate <ProductType, ProductTypeViewDTO>(); foreach (var type in types) { type.Products = _product.GetWithType(type.ID); } return(types); }
public IEnumerable <ProductTypeViewDTO> GetWithTarget() { var types = _repo.GetWithTarget().Translate <ProductType, ProductTypeViewDTO>(); foreach (var type in types) { type.Products = _product.GetWithType(type.ID); } return(types); }