// start and end are strings that will get parsed for datetime ex: "MM-DD-YYYY" and "YYYY-MM-DD" public void GetLocationTemperaturesByDateRange(int locationId, string start, string end) { DateTime startDate = DateTime.Parse(start); DateTime endDate = DateTime.Parse(end); List <Temperature> result = ClassFunctions.GetLocationTemperaturesByDateRange(locationId, startDate, endDate); if (result != null) { BuildResponse(200, result); } else { BuildResponse(500, result); } }