예제 #1
0
        //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));
        }
예제 #2
0
 public JsonResult GetAll()
 {
     return(Json(_doorManager.GetAll()));
 }