Distribution_GL Initialization
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
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<SystemConfig?> GetByKeyAsync(string configKey) =>
|
||||
await _context.SystemConfigs.FirstOrDefaultAsync(c => c.ConfigKey == configKey);
|
||||
|
||||
public async Task<List<SystemConfig>> GetAllAsync() =>
|
||||
await _context.SystemConfigs.OrderBy(c => c.ConfigKey).ToListAsync();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user