22 lines
803 B
C#
22 lines
803 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>();
|
|
|
|
return services;
|
|
}
|
|
}
|