using Newtonsoft.Json; using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations.Schema; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Xml.Serialization; namespace Tango.BL.Entities { public partial class Configuration { [NotMapped] [XmlIgnore] [JsonIgnore] public IEnumerable NoneEmptyIdsPacks { get { return IdsPacks.Where(x => !x.IsEmpty); } } public override void DefferedDelete(ObservablesContext context) { IdsPacks.ToList().ForEach(x => x.DefferedDelete(context)); var machine_configurations = context.MachinesConfigurations.Where(x => x.Configuration == this); MachinesConfigurations.ToList().ForEach(x => x.DefferedDelete(context)); base.DefferedDelete(context); IdsPacks.Clear(); } public override void Delete(ObservablesContext context) { IdsPacks.ToList().ForEach(x => x.DefferedDelete(context)); var machine_configurations = context.MachinesConfigurations.Where(x => x.Configuration == this); MachinesConfigurations.ToList().ForEach(x => x.DefferedDelete(context)); base.Delete(context); IdsPacks.Clear(); } } }