Example #1
0
        public static List <IngredientViewModel> GetAllIngredientsFromDB()
        {
            var database = new SQLiteDataService();

            database.Initialize();
            var allIngredients = database.GetAllIngredients().Select(ingredient => new IngredientViewModel(ingredient)).ToList();

            database.Close();
            return(allIngredients);
        }