private void SaveLocation(FiberLocation location)
        {
            using (var db = new FiberMapWeb.Database.FiberMapContext())
            {
                if (location.LocationId == 0)
                {
                    db.Add(location);
                }
                else
                {
                    db.Update(location);
                }

                db.SaveChanges();
            }
        }
        public IActionResult Delete(int id)
        {
            using (var db = new FiberMapWeb.Database.FiberMapContext())
            {
                var record = db.FiberLocations.Where(x => x.LocationId == id).FirstOrDefault();

                if (record != null)
                {
                    try
                    {
                        db.FiberLocations.Remove(record);
                        db.SaveChanges();
                    } catch (Exception ex) {
                        ModelState.AddModelError("", "Unable to Delete Record");
                        System.Diagnostics.Debug.WriteLine("Error Removing Record: {0}", ex.Message);
                    }
                }
            }

            return(RedirectToAction("List"));
        }