Пример #1
0
        public async Task <AllergyResponse> SaveAsync(Allergy allergy)
        {
            try
            {
                await _allergyRepository.SaveAsync(allergy);

                await _unitOfWork.CompleteAsync();

                return(new AllergyResponse(allergy));
            }
            catch (Exception e)
            {
                return(new AllergyResponse($"An error ocurred while saving plan: {e.Message}"));
            }
        }