Exemplo n.º 1
0
        public IActionResult Edit(int id, [Bind("Id,Name,Email,PhoneNumber")] Dealership dealership)
        {
            if (id != dealership.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    DealershipMgr.putDealership(id, dealership);
                }
                catch (DbUpdateConcurrencyException)
                {
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(dealership));
        }
Exemplo n.º 2
0
 public void Put(int id, [FromBody] Dealership value)
 {
     DealershipMgr.putDealership(id, value);
 }