* Added TaskSchedulerDetails

This commit is contained in:
2025-02-17 06:30:39 +01:00
parent db06837ce9
commit 3767bed896
8 changed files with 84 additions and 8 deletions

View File

@@ -63,4 +63,15 @@ public class TaskSchedulerService(OrdersManagementDbContext context, IMapper map
context.TaskSchedulers.Remove(taskScheduler);
return await context.SaveChangesAsync();
}
public async Task<IList<TaskSchedulerDetailDto>> GetTaskSchedulerDetails(Guid taskSchedulerId)
{
List<TaskSchedulerDetailDto> taskSchedulerDetails = await context.TaskSchedulers
.Where(x => x.RowPointer == taskSchedulerId)
.SelectMany(x => x.TaskSchedulerDetails)
.Select(x => mapper.Map<TaskSchedulerDetailDto>(x))
.ToListAsync();
return taskSchedulerDetails;
}
}