MongoDB + PostgreSQL Injection

This commit is contained in:
andrei-mihnea-cerbu
2024-04-04 17:49:10 +03:00
parent 041abb5900
commit 22f171b560
143 changed files with 3239 additions and 437 deletions
+8 -2
View File
@@ -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;