public JsonResult AssetsUsesDropList(string filterExpression) { AssetsUsesRepository rep = new AssetsUsesRepository(); if (HttpContext.Cache["AssetsUsesDropList"] == null) { DataTable list = rep.GetDropListSource(); HttpContext.Cache.Add("AssetsUsesDropList", list, null, DateTime.Now.AddMinutes(5), TimeSpan.Zero, CacheItemPriority.High, null); } DataTable source = (DataTable)HttpContext.Cache["AssetsUsesDropList"]; filterExpression = DFT.HandleExpress(filterExpression); List <DropListSource> dropList = rep.DropList(source, filterExpression); return(DropListJson(dropList)); }
protected override IMasterFactory CreateRepository() { Repository = new AssetsUsesRepository(); return(new MasterRepositoryFactory <AssetsUsesRepository>(Repository)); }
public ListModel() { Repository = new AssetsUsesRepository(); }