16 lines
512 B
C#
16 lines
512 B
C#
using Microsoft.EntityFrameworkCore;
|
|
using SPMS.Domain.Entities;
|
|
using SPMS.Domain.Interfaces;
|
|
|
|
namespace SPMS.Infrastructure.Persistence.Repositories;
|
|
|
|
public class AppConfigRepository : Repository<AppConfig>, IAppConfigRepository
|
|
{
|
|
public AppConfigRepository(AppDbContext context) : base(context) { }
|
|
|
|
public async Task<AppConfig?> GetByKeyAsync(long serviceId, string configKey)
|
|
{
|
|
return await _dbSet.FirstOrDefaultAsync(c => c.ServiceId == serviceId && c.ConfigKey == configKey);
|
|
}
|
|
}
|