Exemplo n.º 1
0
 //Асинхронный аналог
 public void DataAsync(string city, string name)
 {
     AsyncManager.OutstandingOperations.Increment();
     Task.Factory.StartNew(() =>
                               {
                                   //Создание объекта модели
                                   var prod = new ProductAction();
                                   var model = prod.GetProduct(city, name, Repository);
                                   AsyncManager.Parameters["model"] = model;
                                   AsyncManager.OutstandingOperations.Decrement();
                               });
 }
Exemplo n.º 2
0
 public ActionResult HotelShow(string city, string name)
 {
     var prod = new ProductAction();
     var model = prod.GetProduct(city, name, Repository);
     return RedirectToAction("ListAreas", "Product", new { area = "", data = model, id = 5 });
 }