partial void DeleteCemetery(Cemetery instance);
 partial void UpdateCemetery(Cemetery instance);
 partial void InsertCemetery(Cemetery instance);
		private void detach_Cemeteries(Cemetery entity)
		{
			this.SendPropertyChanging();
			entity.Address = null;
		}
        public void SaveCemetery(Cemetery cemetery)
        {
            // if its a new client, insert it
            if (cemetery.CemeteryID == 0)
            {
                _db.Cemeteries.InsertOnSubmit(cemetery);
            }
            else if (_db.Cemeteries.GetOriginalEntityState(cemetery) == null)
            {
                // we are updating an existing cemetery, but it's not attached
                // to the data context, so attach it and detect changes

                _db.Addresses.Attach(cemetery.Address);
                _db.Cemeteries.Attach(cemetery);
                _db.Cemeteries.Context.Refresh(RefreshMode.KeepCurrentValues, cemetery);
                _db.Addresses.Context.Refresh(RefreshMode.KeepCurrentValues, cemetery.Address);
            }

            _db.SubmitChanges();
        }
 public void DeleteCemetery(Cemetery cemetery)
 {
     _db.Cemeteries.DeleteOnSubmit(cemetery);
     _db.Cemeteries.Context.SubmitChanges();
 }