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)); }
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)); }
public JsonResult FindNearestLocations() { List <AddLocationToMapViewModel> allLocations = AddLocationToMapViewModel.GetAllLocations(context); return(new JsonResult(allLocations)); }