Example #1
0
        /// <summary>
        /// Delete a record
        /// </summary>
        /// <param name="id">identifier id</param>
        public void Delete(int id)
        {
            var mMisSetting = GetById(id);

            if (mMisSetting == null)
            {
                return;
            }

            if (!_context.IsAttached(mMisSetting))
            {
                _context.Mis_Setting.Attach(mMisSetting);
            }
            _context.DeleteObject(mMisSetting);
            _context.SaveChanges();
        }
Example #2
0
        /// <summary>
        /// Delete a record
        /// </summary>
        /// <param name="id">identifier id</param>
        public void Delete(int id)
        {
            var mMisPlay = GetById(id);

            if (mMisPlay == null)
            {
                return;
            }

            if (!_context.IsAttached(mMisPlay))
            {
                _context.Mis_Play.Attach(mMisPlay);
            }
            _context.DeleteObject(mMisPlay);
            _context.SaveChanges();
        }