private Product GetProduct(CreateProductCommand command) { return(new Product(command.Name, command.Price, command.BarCode, command.Description, new Dimensions(command.Dimensions.Length, command.Dimensions.Width, command.Dimensions.Height, command.Dimensions.Weight), command.ManufacturerId ?? Manufacturer.GetDraftManufacturer().Id, command.CategoryId ?? Category.GetDraftCategory().Id, ProductType.SimpleProduct.Id, command.ExternalProperties?.SourceName, command.ExternalProperties?.SourceId)); }
private IEnumerable <Manufacturer> GetPredefinedManufacturer() { yield return(Manufacturer.GetDraftManufacturer()); yield return(new Manufacturer(Guid.Parse("0ed65687-35c3-4ca2-82bd-8e01ea80ae86"), "Ubi-Man", "Ubi-Man", "Ubiquitous shop, selling everything!")); yield return(new Manufacturer(Guid.Parse("990ac537-b7f7-46e4-bc8f-2a743a6cdaeb"), "Shopcom", "Shopcom", "Shop that sells everything online!")); yield return(new Manufacturer(Guid.Parse("7b671d69-990a-490d-80bb-2d88a8b3f797"), "Fake-shop", "Fake-shop", "Does not sell anything, it's a fake shop!")); yield return(new Manufacturer(Guid.Parse("d28d5a73-9ebe-4cc9-b473-b5a50c6d038c"), "GigaWholesaleR", "GigaWholesaleR", "Wholesale, shipping everywhere, selling worldwide!")); }