public HttpResponseMessage Update(HttpRequestMessage request, CTKhachHangChuaBenhViewModel khachhang)
        {
            return(CreateHttpResponse(request, () =>
            {
                HttpResponseMessage response = null;
                if (!ModelState.IsValid)
                {
                    response = request.CreateResponse(HttpStatusCode.BadRequest, ModelState);
                }
                else
                {
                    CTKhachHangChuaBenh NewKh = new CTKhachHangChuaBenh();
                    NewKh.UpdateCTKhachHangChuaBenh(khachhang);
                    _chitietKhachHangService.Update(NewKh);
                    _khachHangService.SaveChange();
                    response = request.CreateResponse(HttpStatusCode.OK, khachhang);
                }

                return response;
            }));
        }
        public HttpResponseMessage Create(HttpRequestMessage request, CTKhachHangChuaBenhViewModel ctKhachHangChuaBenhVM)
        {
            return(CreateHttpResponse(request, () =>
            {
                HttpResponseMessage response = null;
                if (!ModelState.IsValid)
                {
                    response = request.CreateResponse(HttpStatusCode.BadRequest, ModelState);
                }
                else
                {
                    CTKhachHangChuaBenh ct = new CTKhachHangChuaBenh();

                    ct.UpdateCTKhachHangChuaBenh(ctKhachHangChuaBenhVM);
                    _chitietKhachHangService.Add(ct);
                    _khachHangService.SaveChange();

                    response = request.CreateResponse(HttpStatusCode.OK, ctKhachHangChuaBenhVM);
                }

                return response;
            }));
        }