Spaces:
Running
Running
Download FlowAPI.Infrastructure/Repositories/TaskNodeRepository.cs from DanilDrotik/FlowAPI: direct link, hf CLI and curl.
- Browser
- Download file 618 Bytes
-
https://huggingface.co/spaces/DanilDrotik/FlowAPI/resolve/d8ea1e09beb0ef2cedc523cc8585fea6cc52c013/FlowAPI.Infrastructure/Repositories/TaskNodeRepository.cs
- Command line
-
hf download hf://spaces/DanilDrotik/FlowAPI@d8ea1e09beb0ef2cedc523cc8585fea6cc52c013/FlowAPI.Infrastructure/Repositories/TaskNodeRepository.cs
-
curl -L -o TaskNodeRepository.cs https://huggingface.co/spaces/DanilDrotik/FlowAPI/resolve/d8ea1e09beb0ef2cedc523cc8585fea6cc52c013/FlowAPI.Infrastructure/Repositories/TaskNodeRepository.cs
618 Bytes
| using FlowAPI.Application.Interfaces; | |
| using FlowAPI.Domain.Entities; | |
| using FlowAPI.Infrastructure.Data; | |
| using Microsoft.EntityFrameworkCore; | |
| namespace FlowAPI.Infrastructure.Repositories | |
| { | |
| public class TaskNodeRepository : GenericRepository<TaskNode>, ITaskNodeRepository | |
| { | |
| public TaskNodeRepository(AppDbContext context) : base(context) { } | |
| public async Task<IEnumerable<TaskNode>> GetAllByGraphIdAsync(Guid graphId) | |
| { | |
| return await _dbSet | |
| .Where(n => n.GraphId == graphId) | |
| .AsNoTracking() | |
| .ToListAsync(); | |
| } | |
| } | |
| } | |