medicalHistory: deletion when patient is deleted
This commit is contained in:
@@ -1,17 +1,14 @@
|
||||
using Application.Services.Database;
|
||||
using Application.Services.Database.MongoDB;
|
||||
using Application.Services.Database.MongoDB;
|
||||
using Application.Services.Database.PostgreSQL;
|
||||
using Application.Services.HashingAlgorithms;
|
||||
using Application.Services.Jwt;
|
||||
|
||||
using Infrastructure.Data;
|
||||
using Infrastructure.Services.HashingAlgorithms;
|
||||
using Infrastructure.Services.MongoDB;
|
||||
using Infrastructure.Services.PostgreSQL;
|
||||
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using MongoDB.Driver;
|
||||
|
||||
namespace Infrastructure;
|
||||
|
||||
@@ -38,7 +35,7 @@ public static class DependencyInjection
|
||||
|
||||
return new MedicalHistoryMongoDbService(connectionString, databaseName, collectionName);
|
||||
});
|
||||
|
||||
|
||||
services.AddSingleton<IChatMongoDbService>(serviceProvider =>
|
||||
{
|
||||
var configuration = serviceProvider.GetRequiredService<IConfiguration>();
|
||||
@@ -48,7 +45,7 @@ public static class DependencyInjection
|
||||
|
||||
return new ChatMongoDbService(connectionString, databaseName, collectionName);
|
||||
});
|
||||
|
||||
|
||||
services.AddSingleton<IAppointmentsMongoDbService>(serviceProvider =>
|
||||
{
|
||||
var configuration = serviceProvider.GetRequiredService<IConfiguration>();
|
||||
@@ -58,19 +55,18 @@ public static class DependencyInjection
|
||||
|
||||
return new AppointmentsMongoDbService(connectionString, databaseName, collectionName);
|
||||
});
|
||||
|
||||
|
||||
// Other Services
|
||||
services.AddScoped<IHashingAlgorithms, HashingAlgorithms>();
|
||||
|
||||
|
||||
services.AddSingleton<IJwtService, JwtService>(serviceProvider =>
|
||||
{
|
||||
var configuration = serviceProvider.GetRequiredService<IConfiguration>();
|
||||
return new JwtService(configuration);
|
||||
});
|
||||
|
||||
|
||||
// services.AddScoped<IEmailService, EmailService>();
|
||||
|
||||
return services;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user