Spaces:
Running
Running
| using FlowAPI.Application.Interfaces; | |
| using FlowAPI.Domain.Entities; | |
| using FlowAPI.Infrastructure.Data; | |
| using Microsoft.EntityFrameworkCore; | |
| namespace FlowAPI.Infrastructure.Repositories | |
| { | |
| public class EdgeRepository : GenericRepository<Edge>, IEdgeRepository | |
| { | |
| public EdgeRepository(AppDbContext context) : base(context) { } | |
| public async Task<IEnumerable<Edge>> GetAllByGraphIdAsync(Guid graphId) | |
| { | |
| return await _dbSet | |
| .Where(e => e.GraphId == graphId) | |
| .AsNoTracking() | |
| .ToListAsync(); | |
| } | |
| } | |
| } | |