private Category CreateCatalogCategory(ProductCatalog catalog, string name) { var category = CreateCategory(catalog, name); catalog.AddCategory(category); return(category); }
public void AssignCategoryToCatalog(string name, Definition definition, ProductCatalog catalog) { Category category = _categories.Value .SingleOrDefault(c => c.Name == name && c.ProductCatalog.Name == catalog.Name) ?? new Category(); category.Name = name; category.Definition = definition; category.Deleted = false; catalog.AddCategory(category); _catalogs.Value.Save(catalog); }
public void AssignCategoryToCatalog(string name, Definition definition, ProductCatalog catalog) { Category category = _categories.Value .SingleOrDefault(c => c.Name == name && c.ProductCatalog.Name == catalog.Name) ?? new Category(); category.Name = name; category.Definition = definition; category.Deleted = false; catalog.AddCategory(category); _catalogs.Value.Save(catalog); }