예제 #1
0
        /// <summary>
        /// Deletes or partially updates the specified object by uid.
        /// </summary>
        /// <param name="parser">The query parser that specifies the object.</param>
        public override void Delete(WitsmlQueryParser parser)
        {
            var uri = parser.GetUri <T>();

            if (parser.HasElements())
            {
                if (IsDeletingStations(parser))
                {
                    PartialDeleteTrajectoryWithStations(parser, uri);
                }
                else
                {
                    using (var transaction = GetTransaction())
                    {
                        transaction.SetContext(uri);
                        PartialDeleteEntity(parser, uri);
                        UpdateGrowingObject(GetEntity(uri), true);
                        transaction.Commit();
                    }
                }
            }
            else
            {
                Delete(uri);
            }
        }
예제 #2
0
        /// <summary>
        /// Deletes or partially updates the specified object by uid.
        /// </summary>
        /// <param name="parser">The query parser that specifies the object.</param>
        public override void Delete(WitsmlQueryParser parser)
        {
            var uri = parser.GetUri <T>();

            if (parser.HasElements())
            {
                using (var transaction = GetTransaction())
                {
                    transaction.SetContext(uri);
                    PartialDeleteEntity(parser, uri);
                    transaction.Commit();
                }
            }
            else
            {
                Delete(uri);
            }
        }