public void AddCar(Car c) { using (var context = new PeopleCarsDbDataContext(_connectionString)) { context.Cars.InsertOnSubmit(c); context.SubmitChanges(); } }
public void Add(People person) { using (var context = new PeopleCarsDbDataContext(_connectionString)) { context.Peoples.InsertOnSubmit(person); context.SubmitChanges(); } }