Exemplo n.º 1
0
        public void AllRecipeModal(int Id, ModalDetail modalDetail)
        {
            RecipeModal recipeModal = new RecipeModal();

            recipeModal.Recipe = context.Recipes.First(r => r.RecipeId == Id);

            recipeModal.ModalDetail = context.ModalDetails.First(rm => rm.ModalId == modalDetail.ModalId);
            recipeModal.Recipe.RecipeModals.Add(recipeModal);

            context.SaveChanges();
        }
Exemplo n.º 2
0
 public void DeleteRecipeModal(RecipeModal recipeModal)
 {
     context.RecipeModals.Remove(recipeModal);
     context.SaveChanges();
 }