Example #1
0
 public void AddCar(Car car)
 {
     using var context = new PeopleCarsContext(_connectionString);
     context.Cars.Add(car);
     context.SaveChanges();
 }
Example #2
0
 public void AddPerson(Person person)
 {
     using var context = new PeopleCarsContext(_connectionString);
     context.People.Add(person);
     context.SaveChanges();
 }