Пример #1
0
        public void Update(Car car)
        {
            car.EnsureValid();

            DataSource.DataContext.Refresh(System.Data.Linq.RefreshMode.KeepCurrentValues, car);
            DataSource.DataContext.SubmitChanges();
        }
Пример #2
0
        public void Add(Car car)
        {
            if (car.User == null)
                car.User = User;

            car.EnsureValid();

            DataStore.Cars.Add(car);
        }
Пример #3
0
        public void Add(Car car)
        {
            if (car.User == null)
                car.User = User;

            car.EnsureValid();

            DataSource.DataContext.Cars.InsertOnSubmit(car);
            DataSource.DataContext.SubmitChanges();
        }
Пример #4
0
 public void Update(Car car)
 {
     car.EnsureValid();
 }