//Асинхронный аналог 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(); }); }
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 }); }