/// <summary>
        /// Deletes the specified composite egm meter data.
        /// </summary>
        /// <param name="compositeEgmMeterData">The composite egm meter data.</param>
        public void Delete(CompositeEgmMeterData compositeEgmMeterData)
        {
            using (var context = new HmsDbContext())
            {
                if (!context.CompositeEgmMeterDatas.Any(cemd => cemd.Id == compositeEgmMeterData.Id))
                {
                    return;
                }

                // matching PK found, thus we proceed with Delete
                DaoUtilities.DeleteEntity(context, context.CompositeEgmMeterDatas, compositeEgmMeterData);
            }
        }
Example #2
0
        /// <summary>
        /// Deletes the specified EgmVersion entity.
        /// </summary>
        /// <param name="egmVersion">The EgmVersion entity to delete.</param>
        public void Delete(EgmVersion egmVersion)
        {
            using (var context = new HmsDbContext())
            {
                if (!context.EgmVersions.Any(v => v.Id == egmVersion.Id))
                {
                    return;
                }

                // matching PK found, thus we proceed with Delete
                DaoUtilities.DeleteEntity(context, context.EgmVersions, egmVersion);
            }
        }
Example #3
0
        /// <summary>
        /// Deletes the specified EgmMetric entity.
        /// </summary>
        /// <param name="egmMetric">The EgmMetric entity to delete.</param>
        public void Delete(EgmMetric egmMetric)
        {
            using (var context = new HmsDbContext())
            {
                if (!context.EgmMetrics.Any(mr => mr.Id == egmMetric.Id))
                {
                    return;
                }

                // matching PK found, thus we proceed with Delete
                DaoUtilities.DeleteEntity(context, context.EgmMetrics, egmMetric);
            }
        }
        /// <summary>
        /// Deletes the specified egm windows event entity.
        /// </summary>
        /// <param name="egmWindowsEvent">The egm windows event entity.</param>
        public void Delete(EgmWindowsEvent egmWindowsEvent)
        {
            using (var context = new HmsDbContext())
            {
                if (!context.EgmWindowsEvents.Any(winEvt => winEvt.Id == egmWindowsEvent.Id))
                {
                    return;
                }

                // matching PK found, thus we proceed with Delete
                DaoUtilities.DeleteEntity(context, context.EgmWindowsEvents, egmWindowsEvent);
            }
        }