public string GetLessonFilter(DateTime start, DateTime end, string zip)
 {
     ILessonRepository lesson = new LessonRepository();
     var result = lesson.GetFilter(start, end, zip);
     var json = new JavaScriptSerializer().Serialize(result);
     return json;
 }
 public string GetLessonByCat(int id)
 {
     ILessonRepository lesson = new LessonRepository();
     var result = lesson.GetLessonByCat(id);
     var json = new JavaScriptSerializer().Serialize(result);
     return json;
 }
 public string GetAllLesson()
 {
     ILessonRepository lesson = new LessonRepository();
     var result = lesson.GetAll();
     var json = new JavaScriptSerializer().Serialize(result);
     return json;
 }
 public HttpResponseMessage PostLessonUpdate([FromBody] Lesson lesson
    
      )
 {
     ILessonRepository manageLesson = new LessonRepository();
     var result = manageLesson.Update(lesson);
     return Request.CreateResponse(HttpStatusCode.OK, result);
 }
 public HttpResponseMessage PostLessonBookCreate([FromBody] Booking booking
      )
 {
     ILessonRepository lesson = new LessonRepository();
     var result = lesson.Book(booking.user_id, booking.lesson_id);
     return Request.CreateResponse(HttpStatusCode.OK, result);
 }
 public string GetLessonFutur(int iduser)
 {
     ILessonRepository lesson = new LessonRepository();
     var result = lesson.GetLessonByUserInFewTime(iduser);
     var json = new JavaScriptSerializer().Serialize(result);
     return json;
 }