コード例 #1
0
 partial void DeleteLivingWill(LivingWill instance);
コード例 #2
0
 partial void UpdateLivingWill(LivingWill instance);
コード例 #3
0
        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();
        }
コード例 #4
0
 partial void InsertLivingWill(LivingWill instance);
コード例 #5
0
 public void DeleteLivingWill(LivingWill livingWill)
 {
     _db.LivingWills.DeleteOnSubmit(livingWill);
     _db.LivingWills.Context.SubmitChanges();
 }