public async Task rating_service_delete_should_succeed() { var gameId = 1; var userId = 1; _ratingService.Delete(userId, gameId); _mediatorBusMock.Verify(x => x.SendCommand(It.IsAny <DeleteRatingCommand>()), Times.Once); }
public ActionResult DeleteRecipe(RecipeViewModel recipe) { if (recipe.IsDeleted == true) { ingredientService.DeleteAllIngredientsForRecipe(recipe.RecipeID); instructionsService.DeleteAllInstructionsForRecipe(recipe.RecipeID); categoryService.DeleteCategoriesForRecipe(recipe.RecipeID); subcategoryService.DeleteSubcategoriesForRecipe(recipe.RecipeID); commentService.DeleteCommentsForRecipe(recipe.RecipeID); recipeService.DeleteRecipeByID(recipe.RecipeID); ratingService.Delete(recipe.RatingID); } return(RedirectToAction("Index", "Recipe")); }
public ActionResult Delete(int id, FormCollection collection) { try { rating rating = ES.GetById(id); ES.Delete(rating); ES.Commit(); return(RedirectToAction("Index")); } catch { return(View()); } }
public Result Delete(int id) { return(_service.Delete(id)); }