//public JsonResult BringData() //{ // HomeIndexViewModel model = new HomeIndexViewModel // { // neighbors = _neighborManager.GetAll(), // doors = _doorManager.GetAll() // }; // return Json(model); //} public JsonResult BringAddress() { var neighbors = _neighborManager.GetAll(); var doors = _doorManager.GetAll(); var address = doors.Join(neighbors, door => door.NeighborCode, neighbor => neighbor.Id, (door, neighbor) => new { neighborName = neighbor.NeighborName, doorCode = door.DoorCode, geometry = door.Geometry }); return(Json(address)); }
public JsonResult GetAll() { return(Json(_doorManager.GetAll())); }