From d9422a3fb531aea80aa1c88f29720ad927737ce5 Mon Sep 17 00:00:00 2001 From: Eduardo Lopes <155753879+eduardolopesx03@users.noreply.github.com> Date: Tue, 27 Jan 2026 13:19:51 -0300 Subject: [PATCH] Fix Excel import order for Mureg dependencies --- Controllers/LinesController.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Controllers/LinesController.cs b/Controllers/LinesController.cs index b89bc42..a14d2a5 100644 --- a/Controllers/LinesController.cs +++ b/Controllers/LinesController.cs @@ -531,6 +531,8 @@ namespace line_gestao_api.Controllers var startRow = headerRow.RowNumber() + 1; // limpa tudo antes (idempotente) + // ⚠️ limpa dependências primeiro (evita FK Restrict da MUREG) + await _db.MuregLines.ExecuteDeleteAsync(); await _db.MobileLines.ExecuteDeleteAsync(); var buffer = new List(600);