public JsonResult Employees(string id) { var dataContext = new Data.ISMSEntities(); var employees = from e in dataContext.Assets where (string.IsNullOrEmpty(id)?e.LocationID_FK==null: e.LocationID_FK == id) select new { id = e.LocationID_FK, Name = e.asName , //hasChildren = e.asName.Any() hasChildren=true }; int i=employees.Count(); return Json(employees, JsonRequestBehavior.AllowGet); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)