예제 #1
0
        public IActionResult PostRecipeType(TypeViewModel viewModel)
        {
            var type = mapper.Map <RecipeType>(viewModel);

            recipeTypeRepository.Create(type);
            return(RedirectToAction(nameof(GetRecipeTypes)));
        }
예제 #2
0
 public void CreateNewIngredient(Ingredient ingredient)
 {
     repository.Create(ingredient);
 }
예제 #3
0
 public void CreateNewRecipe(Recipe recipe)
 {
     repository.Create(recipe);
 }