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(); }
public IHttpActionResult Post(Shop shop) { db.Shops.Add(shop); db.SaveChanges(); return Ok(); }