Example #1
0
        /// <summary>
        /// Update into CWProfit
        /// </summary>
        /// <param name="cwprofit">CWProfit</param>
        public void UpdateCWProfit(CWProfit cwprofit)
        {
            if (cwprofit == null)
            {
                return;
            }

            if (this._context.IsAttached(cwprofit))
            {
                this._context.CWProfits.Attach(cwprofit);
            }

            this._context.SaveChanges();
        }
Example #2
0
        /// <summary>
        /// Insert into CWProfit
        /// </summary>
        /// <param name="cwprofit">CWProfit</param>
        public void InsertCWProfit(CWProfit cwprofit)
        {
            if (cwprofit == null)
            {
                return;
            }

            if (!this._context.IsAttached(cwprofit))
            {
                this._context.CWProfits.AddObject(cwprofit);
            }

            this._context.SaveChanges();
        }