How can i find an Id by Linq Query in Controller
===

    var productCategoryId = (from ProductCategory in context.ProductCategories
                                                 where (ProductCategory.ProductId==id)
                                               select ProductCategory);
            
Now I m trying to find out an Id from database which may contain in productCategoryId but it is not accessible here, Like,

    var proCategoryId = _categoryService.GetProductCategoryById(productCategoryId);

how can i find achieve this.