Пример #1
0
        //private AppDbContext db;// = new AppDbContext();
        #endregion
        #region DistinctSameCif
        /// <summary>
        /// Inserts a new row in the MdmDQQue table.
        /// </summary>
        /// <param name="mdmque">A MdmDQQue object.</param>
        /// <returns>An updated MdmDQQue object.</returns>
        public DistinctSameCif InsertDistinctSameCif(DistinctSameCif mdmdque)
        {
            using (var db = new AppDbContext())
            {
                db.Set <DistinctSameCif>().Add(mdmdque);
                db.SaveChanges();

                return(mdmdque);
            }
        }
Пример #2
0
        /// <summary>
        /// Updates an existing row in the mdmdque table.
        /// </summary>
        /// <param name="mdmdque">A mdmdque entity object.</param>
        public void UpdateDistinctSameCif(DistinctSameCif mdmdque)
        {
            using (var db = new AppDbContext())
            {
                var entry = db.Entry <DistinctSameCif>(mdmdque);

                // Re-attach the entity.
                entry.State = EntityState.Modified;

                db.SaveChanges();
            }
        }
Пример #3
0
        /// <summary>
        /// Updates the queitem
        /// </summary>
        /// <param name="queitem">queitem</param>
        public virtual void UpdateDistinctSameCif(DistinctSameCif queitem)
        {
            if (queitem == null)
            {
                throw new ArgumentNullException("queitem");
            }

            _dscDAC.UpdateDistinctSameCif(queitem);

            //event notification
            //_eventPublisher.EntityUpdated(vendor);
        }
Пример #4
0
        /// <summary>
        /// Delete an item
        /// </summary>
        /// <param name="queitem">QueItem</param>
        public virtual void _DeleteQueItem(DistinctSameCif queitem)
        {
            if (queitem == null)
            {
                throw new ArgumentNullException("queitem");
            }

            UpdateDistinctSameCifs(queitem);

            //event notification
            //_eventPublisher.EntityDeleted(vendor);
        }