Ejemplo n.º 1
0
        public void DeleteRecipe(RecipeDeletionBindingModel model)
        {
            var recipe = this.Mapper.Map <Recipe>(model);

            this.Context.Recipes.Remove(recipe);
            this.Context.SaveChanges();
        }
Ejemplo n.º 2
0
        public IActionResult Delete(RecipeDeletionBindingModel model)
        {
            this.adminRecipeService.DeleteRecipe(model);

            return(RedirectToAction(AppConstants.IndexRedirect));
        }