public HttpResponseMessage PostInstructor(Instructor instructor)
        {
            if (ModelState.IsValid)
            {
                instructorRepository.Insert(instructor);
                HttpResponseMessage response = Request.CreateResponse(HttpStatusCode.OK, instructor);
                return response;
            }

            return Request.CreateErrorResponse(HttpStatusCode.BadRequest, ModelState);
        }
        public HttpResponseMessage PutInstructor(int id, Instructor instructor)
        {
            if (!ModelState.IsValid)
            {
                return Request.CreateErrorResponse(HttpStatusCode.BadRequest, ModelState);
            }

            if (id != instructor.Id)
            {
                return Request.CreateResponse(HttpStatusCode.BadRequest);
            }

            instructorRepository.Update(x=>x.Id ==id,instructor);

            return Request.CreateResponse(HttpStatusCode.OK);
        }