public ActionResult Details(int id) { Articles a = ar.GetT(id).ProccessResult; if (a != null) { return(View(a)); } else { return(View(ar.GetByIdApi(id).ProccessResult)); } }
void IJob.Execute(IJobExecutionContext context) { var artApi = new ApiMethod(); var ar = new ArticleRep(); List <string> art = new List <string>(); List <ArticleApi> artDes = new List <ArticleApi>(); int i = 0; artApi.Api(art, artDes); if (artDes.Count != 0) { foreach (var item in artDes) { ar.Insert(ar.GetByIdApi(item.Id).ProccessResult); i++; if (i == 20) { break; } } } }