public async Task <IActionResult> Cars(InsuranceСar car)
        {
            db.Cars.Add(car);
            await db.SaveChangesAsync();

            return(RedirectToAction("Index"));
        }
        public async Task <IActionResult> RemoveCar(int?id)
        {
            if (id != null)
            {
                InsuranceСar car = await db.Cars.FirstOrDefaultAsync(p => p.Id == id);

                if (car != null)
                {
                    db.Cars.Remove(car);
                    await db.SaveChangesAsync();

                    return(RedirectToAction("Index"));
                }
            }
            return(NotFound());
        }
        public async Task <IActionResult> Cars(InsuranceСar car)
        {
            if (ModelState.IsValid)
            {
                InsuranceСar cars = await db.Cars.FirstOrDefaultAsync(u => u.NSF == car.NSF);

                if (cars == null)
                {
                    db.Cars.Add(car);
                    await db.SaveChangesAsync();
                }
            }


            return(RedirectToAction("Index"));
        }