using Microsoft.EntityFrameworkCore;
using SportsDivision.Domain.Entities;
using SportsDivision.Domain.Interfaces;
using SportsDivision.Infrastructure.Data;

namespace SportsDivision.Infrastructure.Repositories;

public class ScoringConstantRepository : Repository<ScoringConstant>, IScoringConstantRepository
{
    public ScoringConstantRepository(ApplicationDbContext context) : base(context) { }
    public async Task<ScoringConstant?> GetByEventAsync(int eventId) => await _dbSet.FirstOrDefaultAsync(s => s.EventId == eventId);
}
