예제 #1
0
 public IHttpActionResult Put(Shop item)
 {
     var shop = db.Shops.Find(item.Id);
         shop.Name = item.Name;
         shop.Address = item.Address;
         shop.TimeOfWork = item.TimeOfWork;
         db.SaveChanges();
         return Ok();
 }
예제 #2
0
 public IHttpActionResult Post(Shop shop)
 {
     db.Shops.Add(shop);
     db.SaveChanges();
     return Ok();
 }