aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.DAL.Observables/Partials/Machine.cs
blob: c9782c91bee73fd3851355d86fa8d3088c405b0c (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.Delete();
                machine_config.Configuration.Delete();
            }

            base.Delete();

            ObservablesEntitiesAdapter.Instance.SaveChanges();
        }
    }
}