Exemplo n.º 1
0
 public void Put(int id, int categoryId, [FromBody] Place place)
 {
     place.EditDate         = DateTime.Now;
     place.PlaceId          = id; //double checking id of the form body is the correct id
     place.CategoryId       = categoryId;
     _db.Entry(place).State = EntityState.Modified;
     _db.SaveChanges();
 }
 public void Put(int id, int placeId, [FromBody] Comment comment)
 {
     comment.EditDate         = DateTime.Now;
     comment.CommentId        = id;
     comment.PlaceId          = placeId;
     _db.Entry(comment).State = EntityState.Modified;
     _db.SaveChanges();
 }
 public void Put(int id, [FromBody] Shop shop)
 {
     shop.ShopId           = id;
     _db.Entry(shop).State = EntityState.Modified;
     _db.SaveChanges();
 }
Exemplo n.º 4
0
 public void Put(int id, [FromBody] Restaurant restaurant)
 {
     restaurant.RestaurantId     = id;
     _db.Entry(restaurant).State = EntityState.Modified;
     _db.SaveChanges();
 }
 public void Put(int id, [FromBody] Category category)
 {
     category.CategoryId       = id;
     _db.Entry(category).State = EntityState.Modified;
     _db.SaveChanges();
 }