Exemplo n.º 1
0
        public async Task <IActionResult> PutCategory(int id, Category category)
        {
            if (id != category.CategoryId)
            {
                return(BadRequest());
            }

            _context.Entry(category).State = EntityState.Modified;

            try
            {
                await _context.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!CategoryExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(NoContent());
        }
 public bool PutAddress_Checkout(Address_Checkout address_Checkout)
 {
     _context.Entry(address_Checkout).State = EntityState.Modified;
     _context.SaveChanges();
     return(true);
 }