예제 #1
0
 public Product CreateProductWithDelay(Product product)
 {
     Thread.Sleep(10000);
     product.Id = Products.Count + 1;
     Products.Add(product.Id, product);
     return product;
 }
 public void PublishToProjection(CreateProduct createProduct)
 {
     var product = new Product();
     product.Id = createProduct.ProductId;
     product.Name = createProduct.Name;
     ProductProjections.ProductRepo.Add(product.Id, product);
 }
 public void PublishToProjectionWithDelay(CreateProduct createProduct)
 {
     Thread.Sleep(10000);
     var product = new Product();
     product.Id = createProduct.ProductId;
     product.Name = createProduct.Name;
     ProductProjections.ProductRepo.Add(product.Id, product);
 }
예제 #4
0
 public Product CreateProduct(Product product)
 {
     product.Id = Products.Count + 1;
     Products.Add(product.Id, product);
     return product;
 }
 public ActionResult Create(Product product)
 {
     return RedirectToAction("Details", new { id = "Product ID"});
 }