File size: 598 Bytes
b9c7f0e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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();
        }
    }
}