using General_Ledger_Service.Infra; using General_Ledger_Service.Interfaces.Repositories; using General_Ledger_Service.Models; using Microsoft.EntityFrameworkCore; namespace General_Ledger_Service.Repositories { public class SystemConfigRepository(AppDBContext context) : ISystemConfigRepository { private readonly AppDBContext _context = context; public async Task GetByKeyAsync(string configKey) => await _context.SystemConfigs.FirstOrDefaultAsync(c => c.ConfigKey == configKey); public async Task> GetAllAsync() => await _context.SystemConfigs.OrderBy(c => c.ConfigKey).ToListAsync(); } }