public JsonResult TreeDataOnDemand(string path, string binding, int depth) { TreeModel model = new TreeModel(); switch (depth) { case 0: model.DataSource = RepositoryFactory.GetCategoryRepository(IncludeChildren.Products).Get(); break; default: model.DataSource = RepositoryFactory.GetCategoryRepository().Get(); break; } return model.GetData(path, binding); }
public JsonResult TreeDataOnDemand(string path, string binding, int depth) { TreeModel model = new TreeModel(); switch (depth) { case 0: model.DataSource = RepositoryFactory.GetCategoryRepository(IncludeChildren.Products).Get(); break; default: model.DataSource = RepositoryFactory.GetCategoryRepository().Get(); break; } return(model.GetData(path, binding)); }