public IActionResult CheckAvailability(string id, string start, string end) { try { int gearId = Int32.Parse(id); DateTime startDate = DateTime.Parse(start); DateTime endDate = DateTime.Parse(end); return(Ok(_reservationRepository.CheckAvailability(gearId, startDate, endDate))); } catch { return(NotFound()); } }