public IActionResult Put(int id, [FromBody] HCPDiagnosisViewModel hCPDiagnosisViewModel)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            // Get the HCPDiagnosis to Edit
            var _hCPDiagnosis = _unitOfWork.HCPDiagnoses
                                .GetSingle(id);

            if (_hCPDiagnosis == null)
            {
                return(NotFound());
            }
            else
            {
                _hCPDiagnosis.Price = hCPDiagnosisViewModel.Price;

                // Put logic to handle inputer, maker, checker
            }
            hCPDiagnosisViewModel = _mapper.Map <HCPDiagnosis, HCPDiagnosisViewModel>(_hCPDiagnosis);

            return(new NoContentResult());
        }
        public IActionResult Post([FromBody] HCPDiagnosisViewModel hCPDiagnosisViewModel)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            // Create the HCPDiagnosis
            var newHCPDiagnosis = _mapper.Map <HCPDiagnosisViewModel, HCPDiagnosis>(hCPDiagnosisViewModel);

            _unitOfWork.HCPDiagnoses.Add(newHCPDiagnosis);
            // Commit changes to the database to get HCPDiagnosisId
            _unitOfWork.SaveChanges();

            CreatedAtRouteResult result = CreatedAtRoute("Get", new { controller = "HCPDiagnoses", id = newHCPDiagnosis.Id }, newHCPDiagnosis);

            return(result);
        }