fetch data from database through entity

May 4 at 7:09 AM
i try to use entity framework i have table in sql i.e.

Catg_id Catg_type
1 Medical
2 Engineering
3 Other
i try this

protected void Page_Load(object sender, EventArgs e)
    {
        ProjectdbEntities a = new ProjectdbEntities();
        var b = a.Catg_type;
        foreach (var c in b)
        {
            string catname = c.Catg_type1;
        }

    }
    [WebMethod]
    public static string jqufunc()
    {

    }
and i use highchairs for display charts image


Image
in above image i want to display Medical , Engineering and other instead of Computer laptops other through entity in jquery

$(function () {
    var webmethod = "WebForm1.aspx/jqufunc";

    $.ajax({
        type: "POST",
        url: webmethod,
        data:JSON.stringify({ s:"xyx" }),
        contentType: "application/json;charset=utf-8",
        dataType: "json",
        success: function (response) {
            alert(response.d);
        }
    });
});


$(function () {
    $('#container').highcharts({
        chart: {
            type: 'bar'
        },
        title: {
            text: 'Computer info'
        },
        xAxis: {
            categories: ['Computers', 'Laptops', 'Other ']
        },
        yAxis: {
            title: {
                text: 'Figures'
            }
        },
        series: [{
            name: 'Pentinum 4',
            data: [1, 0, 4]
        }, {
            name: 'Pentinum 3',
            data: [5, 7, 3]
        }, {
            name:'Core i7',
            data:[6,3,4]
        }]
    });
});
now i dont want hard code i want to get data from database and display in chart through entity .. i code in page load but how to call this through function any solution?