ccba017e3e
DB: - V007__CreateFaqs.sql: faqs 테이블 (question, answer, category, sort_order, is_active) + 기본 FAQ 4개 시드 Domain: - Faq 엔티티 - IFaqRepository (GetActiveAsync, GetAllAsync, CRUD) Infrastructure: - FaqRepository: sort_order 정렬, CRUD Application: - FaqService: Categories 상수, Validate (질문·답변 필수) Admin UI (Blazor): - FaqList.razor: 전체 목록, 활성/비활성 상태 칩, 삭제 확인 - FaqEdit.razor: 질문/답변/카테고리/순서/활성 토글 폼 - MainLayout: 홈페이지 그룹 하위에 FAQ 관리 메뉴 추가 홈페이지: - Index.cshtml 하드코딩 FAQ → ActiveFaqs DB 루프로 교체 - FAQ 없으면 섹션 전체 숨김 (빈 DB에 안전) - IndexModel: FaqService 주입, Task.WhenAll 병렬 로드 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
25 lines
1010 B
C#
25 lines
1010 B
C#
namespace TaxBaik.Infrastructure;
|
|
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
using TaxBaik.Domain.Interfaces;
|
|
using TaxBaik.Infrastructure.Data;
|
|
using TaxBaik.Infrastructure.Repositories;
|
|
|
|
public static class DependencyInjection
|
|
{
|
|
public static IServiceCollection AddInfrastructure(this IServiceCollection services)
|
|
{
|
|
services.AddSingleton<IDbConnectionFactory, DbConnectionFactory>();
|
|
services.AddScoped<IAdminUserRepository, AdminUserRepository>();
|
|
services.AddScoped<ICategoryRepository, CategoryRepository>();
|
|
services.AddScoped<IBlogPostRepository, BlogPostRepository>();
|
|
services.AddScoped<IInquiryRepository, InquiryRepository>();
|
|
services.AddScoped<ISiteSettingRepository, SiteSettingRepository>();
|
|
services.AddScoped<IAnnouncementRepository, AnnouncementRepository>();
|
|
services.AddScoped<IClientRepository, ClientRepository>();
|
|
services.AddScoped<IFaqRepository, FaqRepository>();
|
|
|
|
return services;
|
|
}
|
|
}
|