MongoDB + PostgreSQL Injection
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
using Infrastructure.Data;
|
||||
using Application.Contracts.Interfaces;
|
||||
using Infrastructure.Repositories;
|
||||
using Infrastructure.Services.PostgreSQL;
|
||||
using Application.Contracts.Database;
|
||||
using Infrastructure.Services.MongoDB;
|
||||
|
||||
namespace Infrastructure
|
||||
{
|
||||
@@ -19,6 +21,10 @@ namespace Infrastructure
|
||||
services.AddScoped<IDoctorRepository, DoctorRepository>();
|
||||
services.AddScoped<IMedicalHistoryRepository, MedicalHistoryRepository>();
|
||||
|
||||
var mongoDbConnection = configuration.GetConnectionString("MongoDBDatabase");
|
||||
|
||||
services.AddSingleton(serviceProvider => new MongoDbService(mongoDbConnection));
|
||||
|
||||
// services.AddScoped<IEmailService, EmailService>();
|
||||
|
||||
return services;
|
||||
|
||||
Reference in New Issue
Block a user