public async Task DeleteRecipe(Guid id) { if (!await _repository.ExistAsync(a => a.Id == id)) { throw new Exception("Nie ma takiego przepisu."); } var recipe = await _repository.GetAsync(id); await _repository.DeleteAsyn(recipe); }
public async Task DeleteRecipe(int id) { var recipe = await _recipeRepository.GetAsync(id); await _recipeRepository.DeleteAsyn(recipe); }