partial void UpdatePulse(Pulse instance);
partial void DeletePulse(Pulse instance);
partial void InsertPulse(Pulse instance);
private void detach_Pulses(Pulse entity) { this.SendPropertyChanging(); entity.Client = null; }
private void attach_Pulses(Pulse entity) { this.SendPropertyChanging(); entity.Client = this; }
public void SavePulse(Pulse pulse) { // if its a new Pulse, insert it if (pulse.PulseID == 0) { _db.Pulses.InsertOnSubmit(pulse); } else if (_db.Pulses.GetOriginalEntityState(pulse) == null) { // we are updating an existing Pulse, but it's not attached // to the data context, so attach it and detect changes _db.Pulses.Attach(pulse); _db.Pulses.Context.Refresh(RefreshMode.KeepCurrentValues, pulse); } _db.SubmitChanges(); }
public void DeletePulse(Pulse pulse) { _db.Pulses.DeleteOnSubmit(pulse); _db.Pulses.Context.SubmitChanges(); }