// A method to edit the User Location
        public void EditUserLocation(UserLocationEditDTO uleDto)
        {
            // uleDto to userLocation model mapping
            UserLocation userLocation = new UserLocation();

            userLocation.UserLocationName = uleDto.UserLocationName;
            userLocation.Latitude = uleDto.Latitude;
            userLocation.Longitude = uleDto.Longitude;
            userLocation.Radius = uleDto.Radius;
            userLocation.UserId = uleDto.UserId;
            userLocation.LastEmailTime = uleDto.LastEmailTime;
            userLocation.UserLocationId = uleDto.UserLocationId;

            _db.Entry(userLocation).State = EntityState.Modified;
            _db.SaveChanges();
        }
 public ActionResult Edit(UserLocationEditDTO uleDto)
 {
     if (ModelState.IsValid)
     {
         _repo.EditUserLocation(uleDto);
         return RedirectToAction("Index");
     }
     return View(uleDto);
 }