i want to get 5 top ten records of Temperature column and want to convert into json data. i tried like this but not getting desired values
{"success":true,"sensorsdata":{"WaterTemperature":"33.33"}}
using (smartpondEntities DB = new smartpondEntities())
{
var parkingSlot = DB.ParkingSlots.OrderByDescending(x => x.CurrentTime).Select(x => x.WaterTemperature).Take(5);
return Json(new { success = true, sensorsdata = new { WaterTemperature = "33.33" } }, JsonRequestBehavior.AllowGet);
}