Here Mudassar Ahmed Khan has explained with an example, how to use Generic HTTP Handler (ASHX) in ASP.Net MVC Razor.
The Generic HTTP Handler (ASHX) will be using Entity Framework to populate data from database and the output will be returned in JSON format.
The Generic HTTP Handler (ASHX) will be called using a jQuery Client which will read the JSON values and populate it into an HTML Table in ASP.Net MVC Razor.