public async Task <IActionResult> DeleteAsync(int id) { var result = await _treatmentService.DeleteAsync(id); if (!result.Success) { return(BadRequest(result.Message)); } var treatmentResource = _mapper.Map <Treatment, TreatmentResource>(result.Resource); return(Ok(treatmentResource)); }