public HttpResponseMessage DeleteRandevu(randevu ran) { try { using (var db = new HastaneDBEntities()) { return(Request.CreateResponse(HttpStatusCode.OK, db.RemoveAppointmentPatient(ran.id, ran.Did))); } } catch (Exception ex) { return(Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex)); } }