예제 #1
0
        public static Product Create(PlainText name, Quantity quantity, Cost cost, ProductCode productCode, PlainText description, string image)
        {
            Product product = new Product()
            {
                Id          = Guid.NewGuid(),
                Name        = name,
                Quantity    = quantity,
                Created     = DateTime.Now,
                Modified    = DateTime.Now,
                Active      = true,
                Cost        = cost,
                Code        = productCode,
                Description = description,
                Image       = image
            };

            DomainEvents.Raise <ProductCreated>(new ProductCreated(product));
            return(product);
        }
예제 #2
0
 public ProductCodeCreated(ProductCode productCode)
 {
     this.Args.Add("Cpde", productCode.Name);
 }