Example #1
0
 partial void UpdatePulse(Pulse instance);
Example #2
0
 partial void DeletePulse(Pulse instance);
Example #3
0
 partial void InsertPulse(Pulse instance);
Example #4
0
		private void detach_Pulses(Pulse entity)
		{
			this.SendPropertyChanging();
			entity.Client = null;
		}
Example #5
0
		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();
 }