Ejemplo n.º 1
0
        public async Task <TreatmentResponse> SaveAsyncTreatment(TreatmentModel treatment)
        {
            try
            {
                await _treatmentRepository.AddAsyncTreatment(treatment);

                await _unitOfWork.CompleteAsync();

                return(new TreatmentResponse(treatment));
            }
            catch (Exception ex)
            {
                return(new TreatmentResponse($"AnError when saving the Treatment: {ex.Message}"));
            }
        }