2016-06-14 48 views
0

我擁有帶以下代碼的控制器。 和mvc5中的索引負載的性能問題kedno

  public ActionResult Index() 
     { 
      ViewData["ContractNumber"] = Mapper.Map<IList<Contract>, IList<ContractModel.contract>>(contractService.GetAll()).AsQueryable(); 
      ViewData["ContractorName"] = Mapper.Map<IList<fContractor>, IList<ContractorModel.contractor>>(contractorService.GetAll()).AsQueryable(); 
      ViewData["ServiceNameString"] = Mapper.Map<IList<fServiceDetail>, IList<ModelServiceDetail>>(serviceDetailsService.GetAll()).AsQueryable(); 


      return View(ViewData); 
     } 

在映射器的每個表具有aroung 500至1500的記錄。

執行時,返回到索引需要很長時間。

有人可以建議修復性能onlaod的代碼。

回答

0

問題已修復。

問題是關於映射器和解析器擴展。