public ActionResult DeleteTastingNote(int brewId, int id) { if (!_homebrewRepository.BrewExists(brewId)) { return(NotFound()); } var tastingNoteEntity = _homebrewRepository.GetTastingNote(brewId, id); if (tastingNoteEntity == null) { return(NotFound()); } _homebrewRepository.DeleteTastingNote(tastingNoteEntity); _homebrewRepository.Save(); return(NoContent()); }