using Back.Program.Common.Auth.Interface; using Back.Program.Common.Data; using Microsoft.EntityFrameworkCore; namespace Back.Program.Common.Auth { /// /// DB에서 헤더 키값 찾아서 그 밸류 값 빼오기 위해서 사용 /// public class HeaderConfigRepository : IHeaderConfig { private readonly AppDbContext _dbContext; public HeaderConfigRepository(AppDbContext dbContext) { _dbContext = dbContext; } public async Task GetExpectedHeaderValueAsync(string headerValue) { var config = await _dbContext.APIHeader .FirstOrDefaultAsync(h => h.h_value == headerValue); return config?.h_key ?? string.Empty; } } }