Beispiel #1
0
 partial void DeleteLivingWill(LivingWill instance);
Beispiel #2
0
 partial void UpdateLivingWill(LivingWill instance);
        public void SaveLivingWill(LivingWill livingWill)
        {
            // if its a new client, insert it
            if (livingWill.LivingWillID == 0)
            {
                _db.LivingWills.InsertOnSubmit(livingWill);
            }
            else if (_db.LivingWills.GetOriginalEntityState(livingWill) == null)
            {
                // we are updating an existing will, but it's not attached
                // to the data context, so attach it and detect changes

                _db.LivingWills.Attach(livingWill);
                _db.LivingWills.Context.Refresh(RefreshMode.KeepCurrentValues, livingWill);
            }

            _db.SubmitChanges();
        }
Beispiel #4
0
 partial void InsertLivingWill(LivingWill instance);
 public void DeleteLivingWill(LivingWill livingWill)
 {
     _db.LivingWills.DeleteOnSubmit(livingWill);
     _db.LivingWills.Context.SubmitChanges();
 }