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)); }
public IActionResult Delete(int id) { _allergyRepository.Remove(id); return(Ok()); }