示例#1
0
        public void DeleteCategory(string categoryName)
        {
            currentCategories = serializer.DeserializeCategory();
            /*##########Borde brytas ut i en egen metod############### */

            currentCategories.RemoveAll(x => x.Name == categoryName);

            serializer.DeleteAllCategories();
            /*##########Borde brytas ut i en egen metod############### */

            foreach (Category category in currentCategories)
            {
                serializer.SerializeCategory(category);
            }
        }