using Microsoft.Extensions.DependencyInjection; using Microsoft.EntityFrameworkCore; using MTWorkHR.Infrastructure.Data; using Microsoft.Extensions.Configuration; using MTWorkHR.Core.IRepositories.Base; using MTWorkHR.Infrastructure.Repositories; using MTWorkHR.Core.IRepositories; using MTWorkHR.Identity.Entities; using Microsoft.AspNetCore.Identity; using MTWorkHR.Core.UnitOfWork; using MTWorkHR.Infrastructure.UnitOfWorks; using MTWorkHR.Core.Global; namespace MTWorkHR.Infrastructure { public static class PersistenceServiceRegistration { public static IServiceCollection AddPersistenceServices2 (this IServiceCollection services, AppSettingsConfiguration configuration) { //services.AddDbContext(options => { // options.UseSqlServer(configuration.ConnectionStrings.MTWorkHRConnectionString); //}); //services.AddScoped(typeof(IRepository<>), typeof(Repository<>)); //services.AddScoped(typeof(IRepositoryLog<>), typeof(RepositoryLog<>)); //services.AddScoped(typeof(IPermissionRepository), typeof(PermissionRepository)); //services.AddScoped(typeof(ICompanyRepository), typeof(CompanyRepository)); //services.AddScoped(typeof(IRolePermissionRepository), typeof(RolePermissionRepository)); //services.AddScoped(typeof(IUserRoleRepository>), typeof(UserRoleRepository)); //services.AddScoped(); //services.AddScoped(); //services.AddScoped(); //services.AddScoped(); //services.AddScoped(); return services; } } }