using Microsoft.EntityFrameworkCore; using SPMS.Domain.Entities; using SPMS.Domain.Interfaces; namespace SPMS.Infrastructure.Persistence.Repositories; public class FaqRepository : Repository, IFaqRepository { public FaqRepository(AppDbContext context) : base(context) { } public async Task> GetActiveListAsync(string? category = null) { var query = _dbSet.Where(f => f.IsActive); if (!string.IsNullOrWhiteSpace(category)) query = query.Where(f => f.Category == category); return await query .OrderBy(f => f.SortOrder) .ToListAsync(); } }