Inizio fix gestione reparti
This commit is contained in:
@@ -186,17 +186,16 @@ namespace MP.SPEC.Data
|
||||
/// Delete record AnagraficaGruppi
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public bool AnagGruppiDelete(AnagGruppiModel updRec)
|
||||
public async Task<bool> AnagGruppiDeleteAsync(AnagGruppiModel updRec)
|
||||
{
|
||||
using var activity = ActivitySource.StartActivity("AnagGruppiDelete");
|
||||
using var activity = ActivitySource.StartActivity("AnagGruppiDeleteAsync");
|
||||
bool result = false;
|
||||
result = dbController.AnagGruppiDelete(updRec);
|
||||
// elimino cache redis...
|
||||
string pattern = $"{Utils.redisAnagGruppi}:*";
|
||||
bool answ = ExecFlushRedisPattern(pattern);
|
||||
activity?.SetTag("data.source", "DB+REDIS");
|
||||
await FlushCacheByTagAsync(Utils.redisAnagGruppi);
|
||||
activity?.SetTag("data.source", "DB");
|
||||
activity?.Stop();
|
||||
LogTrace($"AnagGruppiDelete | CodGruppo {updRec.CodGruppo} | {activity?.Duration.TotalMilliseconds}ms");
|
||||
LogTrace($"AnagGruppiDeleteAsync | CodGruppo {updRec.CodGruppo} | {activity?.Duration.TotalMilliseconds}ms");
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -205,17 +204,16 @@ namespace MP.SPEC.Data
|
||||
/// </summary>
|
||||
/// <param name="UpdRec"></param>
|
||||
/// <returns></returns>
|
||||
public bool AnagGruppiUpsert(AnagGruppiModel UpdRec)
|
||||
public async Task<bool> AnagGruppiUpsertAsync(AnagGruppiModel UpdRec)
|
||||
{
|
||||
using var activity = ActivitySource.StartActivity("AnagGruppiUpsert");
|
||||
using var activity = ActivitySource.StartActivity("AnagGruppiUpsertAsync");
|
||||
bool result = false;
|
||||
result = dbController.AnagGruppiUpsert(UpdRec);
|
||||
// elimino cache redis...
|
||||
string pattern = $"{Utils.redisAnagGruppi}:*";
|
||||
bool answ = ExecFlushRedisPattern(pattern);
|
||||
activity?.SetTag("data.source", "DB+REDIS");
|
||||
await FlushCacheByTagAsync(Utils.redisAnagGruppi);
|
||||
activity?.SetTag("data.source", "DB");
|
||||
activity?.Stop();
|
||||
LogTrace($"AnagGruppiUpsert | CodGruppo {UpdRec.CodGruppo} | {activity?.Duration.TotalMilliseconds}ms");
|
||||
LogTrace($"AnagGruppiUpsertAsync | CodGruppo {UpdRec.CodGruppo} | {activity?.Duration.TotalMilliseconds}ms");
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user