Esempio n. 1
0
 partial void DeleteFuneralHome(FuneralHome instance);
Esempio n. 2
0
 partial void UpdateFuneralHome(FuneralHome instance);
Esempio n. 3
0
 partial void InsertFuneralHome(FuneralHome instance);
Esempio n. 4
0
		private void detach_FuneralHomes(FuneralHome entity)
		{
			this.SendPropertyChanging();
			entity.Address = null;
		}
Esempio n. 5
0
        public void SaveFuneralHome(FuneralHome funeralHome)
        {
            // if its a new client, insert it
            if (funeralHome.FuneralHomeID == 0 || funeralHome.FuneralHomeID == 1)
            {
                _db.FuneralHomes.InsertOnSubmit(funeralHome);
            }
            else if (_db.FuneralHomes.GetOriginalEntityState(funeralHome) == null)
            {
                // we are updating an existing funeral home, but it's not attached
                // to the data context, so attach it and detect changes

                _db.Addresses.Attach(funeralHome.Address);
                _db.FuneralHomes.Attach(funeralHome);
                _db.FuneralHomes.Context.Refresh(RefreshMode.KeepCurrentValues, funeralHome);
                _db.Addresses.Context.Refresh(RefreshMode.KeepCurrentValues, funeralHome.Address);
            }

            _db.SubmitChanges();
        }
Esempio n. 6
0
 public void DeleteFuneralHome(FuneralHome funeralHome)
 {
     _db.FuneralHomes.DeleteOnSubmit(funeralHome);
     _db.FuneralHomes.Context.SubmitChanges();
 }