Пример #1
0
        public async Task <IActionResult> DeleteVehicle(int id)
        {
            var vehicle = await context.Vehicles.FindAsync(id);

            if (vehicle == null)
            {
                return(NotFound());
            }
            context.Remove(vehicle);
            await context.SaveChangesAsync();

            return(Ok(id));
        }