aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.DAL.Observables/Partials/Machine.cs
blob: 71c1eeaeeaf8bf78e88d8a22888ef27e6b11b633 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Tango.DAL.Observables
{
    public partial class Machine
    {
        /// <summary>
        /// Deletes this entity from the database
        /// </summary>
        public override void Delete()
        {
            foreach (var machine_config in MachinesConfigurations)
            {
                machine_config.SoftDelete();
                machine_config.Configuration.SoftDelete();
            }

            base.SoftDelete();

            ObservablesEntitiesAdapter.Instance.SaveChanges();
        }
    }
}