public IResult Remove(int id)
        {
            var allergyCheck = CheckAllergyExist(id);

            if (!allergyCheck.IsSuccess)
            {
                return(new ErrorResult(allergyCheck.Message));
            }
            _allergyRepository.Remove(allergyCheck.Data);
            return(new SuccessResult(Messages.AllergyDeleted));
        }
Beispiel #2
0
 public IActionResult Delete(int id)
 {
     _allergyRepository.Remove(id);
     return(Ok());
 }