Ejemplo n.º 1
0
        public IActionResult ShowNearestLocation(string name, string address, string hours, string description, string position)
        {
            AddLocationToMapViewModel nearestLocation = new AddLocationToMapViewModel()
            {
                Name        = name,
                Address     = address,
                Hours       = hours,
                Description = description,
                LatLng      = position,
            };

            return(View(nearestLocation));
        }
Ejemplo n.º 2
0
        public bool AddLocationToMap(string name, string address, string hours, string description, string latlng)
        {
            string userId = userManager.GetUserId(User);
            AddLocationToMapViewModel newLocation = new AddLocationToMapViewModel()
            {
                UserId      = userId,
                Name        = name,
                Address     = address,
                Hours       = hours,
                Description = description,
                LatLng      = latlng,
            };

            return(newLocation.AddLocationToMap(context));
        }
Ejemplo n.º 3
0
        public JsonResult FindNearestLocations()
        {
            List <AddLocationToMapViewModel> allLocations = AddLocationToMapViewModel.GetAllLocations(context);

            return(new JsonResult(allLocations));
        }