コード例 #1
0
        // Method to delete a multiple recipes from sqlite database using favorite service
        public void deleteMultiples(string recipes, string userName)
        {
            Factory      factory   = new Factory();
            IFavoriteSvc recipeSvc = (IFavoriteSvc)factory.getService("IFavoriteSvc");

            recipeSvc.deleteMultiple(recipes, userName);
        }
コード例 #2
0
        // Method to update a single recipe in the sqlite database using favorite service
        public void updateRecipe(Recipe recipe, string userName)
        {
            Factory      factory   = new Factory();
            IFavoriteSvc recipeSvc = (IFavoriteSvc)factory.getService("IFavoriteSvc");

            recipeSvc.update(recipe, userName);
        }
コード例 #3
0
        // Method to store list of favorite recipes to sqlite database using favorite service
        public void storeRecipes(List <Recipe> list, string userName)
        {
            Factory      factory   = new Factory();
            IFavoriteSvc recipeSvc = (IFavoriteSvc)factory.getService("IFavoriteSvc");

            recipeSvc.create(list, userName);
        }
コード例 #4
0
        // Method to retrieve all recipes stored is sqlite database using favorite service
        public List <Recipe> retrieveRecipes(string userName)
        {
            Factory       factory   = new Factory();
            IFavoriteSvc  recipeSvc = (IFavoriteSvc)factory.getService("IFavoriteSvc");
            List <Recipe> list      = recipeSvc.retrieveAllRecipes(userName);

            return(list);
        }