Exemplo n.º 1
0
 partial void DeleteCemetery(Cemetery instance);
Exemplo n.º 2
0
 partial void UpdateCemetery(Cemetery instance);
Exemplo n.º 3
0
 partial void InsertCemetery(Cemetery instance);
Exemplo n.º 4
0
		private void detach_Cemeteries(Cemetery entity)
		{
			this.SendPropertyChanging();
			entity.Address = null;
		}
Exemplo n.º 5
0
        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();
        }
Exemplo n.º 6
0
 public void DeleteCemetery(Cemetery cemetery)
 {
     _db.Cemeteries.DeleteOnSubmit(cemetery);
     _db.Cemeteries.Context.SubmitChanges();
 }