Populate KendoUi Treeview with RavenDB documents
问题 I am using MVC4 and C#. I have a KendoUI Treeview and I'd like to populate it with data from RavenDB. In the demo they use this: public JsonResult Employees(int? id) { var dataContext = new NorthwindDataContext(); var employees = from e in dataContext.Employees where (id.HasValue ? e.ReportsTo == id : e.ReportsTo == null) select new { id = e.EmployeeID, Name = e.FirstName + " " + e.LastName, hasChildren = e.Employees.Any() }; return Json(employees, JsonRequestBehavior.AllowGet); } Notice the