public void SaveSubCategory(ISubCategoryData subCategory)
        {
            using (LudwigRecipeContext context = new LudwigRecipeContext())
            {
                SubCategory changeSubCategory = context.SubCategories.FirstOrDefault(x => x.Id == subCategory.Id);

                changeSubCategory.DisplayOrder = subCategory.Order;
                changeSubCategory.Name         = subCategory.Name;
                changeSubCategory.Url          = subCategory.Url;

                context.SaveChanges();
            }
        }
        public int AddSubCategory(ISubCategoryData subCategory)
        {
            using (LudwigRecipeContext context = new LudwigRecipeContext())
            {
                Category category = context.Categories.FirstOrDefault(x => x.Id == subCategory.CategoryId);

                SubCategory newSubCategory = new SubCategory()
                {
                    DisplayOrder = subCategory.Order,
                    Name         = subCategory.Name,
                    Url          = subCategory.Url,
                    Category     = category
                };
                context.SubCategories.Add(newSubCategory);
                context.SaveChanges();
                return(newSubCategory.Id);
            }
        }