示例#1
0
        /// <summary>
        /// Update into BudgetSetting
        /// </summary>
        /// <param name="budgetsetting">BudgetSetting</param>
        public void UpdateBudgetSetting(BudgetSetting budgetsetting)
        {
            if (budgetsetting == null)
            {
                return;
            }

            if (this._context.IsAttached(budgetsetting))
            {
                this._context.BudgetSettings.Attach(budgetsetting);
            }

            this._context.SaveChanges();
        }
示例#2
0
        /// <summary>
        /// Insert into BudgetSetting
        /// </summary>
        /// <param name="budgetsetting">BudgetSetting</param>
        public void InsertBudgetSetting(BudgetSetting budgetsetting)
        {
            if (budgetsetting == null)
            {
                return;
            }

            if (!this._context.IsAttached(budgetsetting))
            {
                this._context.BudgetSettings.AddObject(budgetsetting);
            }

            this._context.SaveChanges();
        }