-
-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathTaskRepository.cs
More file actions
26 lines (22 loc) · 802 Bytes
/
TaskRepository.cs
File metadata and controls
26 lines (22 loc) · 802 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
using HackSystem.WebAPI.Application.Repository.Abstractions;
using HackSystem.WebAPI.TaskServer.Application.Repository;
using HackSystem.WebAPI.TaskServer.Domain.Entity;
using Microsoft.EntityFrameworkCore;
namespace HackSystem.WebAPI.TaskServer.Infrastructure.Repository;
public class TaskRepository : RepositoryBase<TaskDetail>, ITaskRepository
{
public TaskRepository(
ILogger<TaskRepository> logger,
DbContext dbContext)
: base(logger, dbContext)
{
}
public async Task<IEnumerable<TaskDetail>> QueryTasks()
{
return this.AsEnumerable();
}
public async Task<IEnumerable<TaskDetail>> QuerySchedulableTasks()
{
return this.AsQueryable().Where(task => task.Enabled && task.TaskFrequency != TaskFrequency.Manually);
}
}