public void SaveProduct() { var parent = new ProductMaster { Name = "Produkt", Description = "Description" }; _repo.Save(parent); var variant = new ProductVariant(parent) { }; parent.Add(variant); _repo.Commit(); }
private void Create(int ii) { var producer = new Producer { Name = "Producer" }; _repo.Save(producer); var parent = new ProductMaster { Name = "Produkt " + ii, Description = LoremIpsum.Text }; _repo.Save(parent); foreach (var color in new EnumMeta <Color>().GetValues()) { var variant = new ProductVariant(parent) { Color = color }; parent.Add(variant); } _repo.Commit(); }
public ProductVariantBuilder ForMaster(ProductMaster master) { master.Add(Item); return(MySelf); }