public async Task <ActionResult <AutosBuyer> > PostAutosBuyer(AutosBuyer autosBuyer)
        {
            _context.autosbuyer.Add(autosBuyer);
            await _context.SaveChangesAsync();

            return(CreatedAtAction("GetAutosBuyer", new { id = autosBuyer.BuyrID }, autosBuyer));
        }
        public async Task <IActionResult> PutAutosBuyer(string id, AutosBuyer autosBuyer)
        {
            if (id != autosBuyer.BuyrID)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }