public async Task <HttpResponseMessage> CancelAppointment(Guid appointmentId) { //var req = new Request(); //req.RequestId = appointmentId; //req.IsComplete = true; var conf = await _commonDomainService.GetConfigurationAsync("NumberOfDates"); return(await ValidateAndHandleOperationExecutionAsync(async() => { var res = await _calendarDomainService.CancelAppointment(appointmentId, Convert.ToInt32(conf.Value.ToString())); // var result = await _requestDomainService.SaveRequest(req); return Request.CreateResponse(HttpStatusCode.OK, res); })); }