示例#1
0
        public MyRecipeBook(IRecipeManager businessLayer)
        {
            BusinessLayer = businessLayer;
            Recipes       = BusinessLayer.GetRecipes();
            RecipeTypes   = BusinessLayer.GetRecipeTypes();
            RawMaterials  = BusinessLayer.GetRawMaterial();
            Units         = BusinessLayer.GetUnits();

            Soups       = new ObservableCollection <Recipe>(Recipes.Where(r => r.Type.Name == "Leves"));
            MainCourses = new ObservableCollection <Recipe>(Recipes.Where(r => r.Type.Name == "Főétel"));
            Desserts    = new ObservableCollection <Recipe>(Recipes.Where(r => r.Type.Name == "Desszert"));
        }