示例#1
0
        public void MYSQLDbAccessTests()
        {
            List <int> recipesIds = MySQLDbAccess.GetRecipesIdsThatContainsIngredients(new List <Ingredient>()
            {
                new Ingredient()
                {
                    Id = 283, Name = "Açucar"
                }
            }, new RecipeType()
            {
                Id = 3, Name = "Vegetariano"
            });

            List <Unit>          units      = MySQLDbAccess.GetAllUnits();
            List <ApplianceType> appliances = MySQLDbAccess.GetAllApplianceTypes();
            Recipe recipe = MySQLDbAccess.GetRecipeById(2);

            //List<int> recipesIds = MySQLDbAccess.GetRecipesIdsThatContainsIngredients(new List<Ingredient>() { new Ingredient() { Id = 24, Name = "Banana" } });
            List <Ingredient> ingredients    = MySQLDbAccess.GetAllIngredients();
            Ingredient        ingredient     = MySQLDbAccess.GetIngredientById(111);
            Ingredient        ingredient2    = MySQLDbAccess.GetIngredientByName("Limão");
            User                  user       = MySQLDbAccess.GetUserById(1);
            RecipeType            recipeType = MySQLDbAccess.GetRecipeTypeById(1);
            Unit                  unit       = MySQLDbAccess.GetUnitTypeById(1);
            List <IngredientInfo> infos      = MySQLDbAccess.GetIngredientInfosFromRecipe(1);
        }
示例#2
0
 public void MYSQLDbAccessTests()
 {
     List <int> recipesIds = MySQLDbAccess.GetRecipesIdsThatContainsIngredients(new List <Ingredient>()
     {
         new Ingredient()
         {
             Id = 111, Name = "Limão"
         }
     });
     List <Ingredient> ingredients    = MySQLDbAccess.GetAllIngredients();
     Ingredient        ingredient     = MySQLDbAccess.GetIngredientById(111);
     Ingredient        ingredient2    = MySQLDbAccess.GetIngredientByName("Limão");
     User                  user       = MySQLDbAccess.GetUserById(1);
     RecipeType            recipeType = MySQLDbAccess.GetRecipeTypeById(1);
     Unit                  unit       = MySQLDbAccess.GetUnitTypeById(1);
     List <IngredientInfo> infos      = MySQLDbAccess.GetIngredientInfosFromRecipe(1);
     Recipe                recipe     = MySQLDbAccess.GetRecipeById(1);
 }