public List <CategoryGroup> GetProductsGroupedByCategory() { _repo = _serviceAccessor(true); //set it to true to use the Dapper repo return(_repo.GetProductsGrouped()); }