prova intersect

This commit is contained in:
zaccaria.majid
2023-08-07 15:09:14 +02:00
parent cf941dcede
commit ab6b2ea2a9
3 changed files with 45 additions and 13 deletions
+11 -6
View File
@@ -108,12 +108,16 @@ namespace SMGen.Data.Controllers
{
try
{
//localDbCtx
// .DbSetAnagEventiTemp
// .AddRange(newEvRecs);
//await localDbCtx.SaveChangesAsync();
//fatto = true;
localDbCtx
.Database
.ExecuteSqlRaw("DELETE FROM AnagraficaEventi_Chk");
localDbCtx
.DbSetAnagEventiTemp
.AddRange(newEvRecs);
await localDbCtx.SaveChangesAsync();
fatto = true;
#if false
foreach (var item in newEvRecs)
{
var currRec = localDbCtx
@@ -132,7 +136,8 @@ namespace SMGen.Data.Controllers
.DbSetAnagEventiTemp
.Add(item);
}
}
}
#endif
await localDbCtx.SaveChangesAsync();
fatto = true;
Log.Info($"Gli stati sono OK!");