public JsonResult GetRecordsWithDate(string startDate, string endDate) { DateTime start, end; start = Convert.ToDateTime(startDate); end = Convert.ToDateTime(endDate); return(new JsonResult(_sensorDataService.GetByDate(start, end))); }