Riorganizzazione commenti --> note
This commit is contained in:
@@ -302,6 +302,38 @@ namespace MP.Data.Controllers
|
||||
_configuration = null;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Eliminazione record EventList (SE trovato)
|
||||
/// </summary>
|
||||
/// <param name="newRec"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<bool> EvListDelete(string idxMacchina, DateTime dtEvento)
|
||||
{
|
||||
bool fatto = false;
|
||||
using (var dbCtx = new MoonProContext(_configuration))
|
||||
{
|
||||
try
|
||||
{
|
||||
var item2del = dbCtx
|
||||
.DbSetEvList
|
||||
.Where(x => x.IdxMacchina == idxMacchina && x.InizioStato == dtEvento)
|
||||
.FirstOrDefault();
|
||||
if (item2del != null)
|
||||
{
|
||||
dbCtx.DbSetEvList.Remove(item2del);
|
||||
await dbCtx.SaveChangesAsync();
|
||||
}
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Eccezione durante EvListDelete{Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
await Task.Delay(1);
|
||||
return fatto;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Aggiunta record EventList
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user