public async Task <ActionResult <AutosSeller> > PostAutosSeller(AutosSeller autosSeller) { _context.autosseller.Add(autosSeller); await _context.SaveChangesAsync(); return(CreatedAtAction("GetAutosSeller", new { id = autosSeller.SellID }, autosSeller)); }
public async Task <IActionResult> PutAutosSeller(string id, AutosSeller autosSeller) { if (id != autosSeller.SellID) { return(BadRequest()); } _context.Entry(autosSeller).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!AutosSellerExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }