public void Update(int id, [FromBody] string hours)
        {
            DogParks.Models.DogPark dp = _db.DogParks.FirstOrDefault(entry => entry.DogParkId == id);

            if (hours != null)
            {
                dp.Hours = hours;
            }

            _db.Entry(dp).State = EntityState.Modified;
            _db.SaveChanges();
        }
 public void Put(int id, [FromBody] DogParks.Models.DogPark dogPark)
 {
     dogPark.DogParkId        = id;
     _db.Entry(dogPark).State = EntityState.Modified;
     _db.SaveChanges();
 }
 public void Post([FromBody] DogParks.Models.DogPark dogPark)
 {
     _db.DogParks.Add(dogPark);
     _db.SaveChanges();
 }