How to send li id click li (Particular id).This is my .cshtml code

Blog Categories

    @foreach (var category in Model)
    {
    }
     
     This is my .cs file code(not it's component not controller and not send id by query string)
     
    private async Task> MapBlogPostsAsync(PagedQueryResult customEntityResult)
    {
    var blogPosts = new List(customEntityResult.Items.Count());
    var imageAssetIds = customEntityResult
    .Items
    .Select(i => (BlogPostDataModel)i.Model)
    .Select(m => m.ThumbnailImageAssetId)
    .Distinct();
    //string Categoryid = HttpContext.Request.Query["CatgeoryId"].SingleOrDefault();
    var Categoryid = customEntityResult.Items.Select(x => (BlogPostDataModel)x.Model).Select(x => x.CategoryIds).FirstOrDefault();
     }