Получение списка задач для Хоста по Ip

This commit is contained in:
Mikhail Kuznetsov
2023-06-20 16:54:38 +10:00
parent 37390fa1c8
commit 8747fea111
10 changed files with 274 additions and 29 deletions

View File

@@ -20,5 +20,15 @@ namespace PARR.DAL.Services.Implementations
protected override DbSet<JobJournal> EntitySet => dataContext.JobJournals;
protected override DataContext EntitiContext => dataContext;
public async Task<JobJournal?> GetLastAsync(Guid jobId, Guid hostId, DateTimeOffset date)
{
var opers = await EntitySet
.Where(j => j.JobId == jobId && j.HostId == hostId && j.DateOper.DateTime.Date == date.DateTime.Date)
.OrderBy(t => t.DateOper)
.LastOrDefaultAsync();
return opers;
}
}
}