private void ClearDataBase() { foreach (Tunnel tunnel in Tunnel.GetTunnels()) { foreach (Cultivation cultivation in Cultivation.GetCultivationsInTunnel(tunnel.id)) { CultivationComment.DeleteFromBreeding(cultivation.id); Cultivation.DeleteFromTunnel(cultivation.id); } foreach (AvrDevice avr_device in AvrDevice.GetAvrDevicesInTunnel(tunnel.id)) { Measurement.DeleteMeasurements(); AvrDevice.DeleteAvrDevice(avr_device.id); } Tunnel.DeleteTunnel(tunnel.id); } Plant.DeletePlants(); }
public IActionResult Get() { return(new ObjectResult(Tunnel.GetTunnels())); }