Compare commits
1 Commits
323a5c0941
...
3624fc58ac
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3624fc58ac |
@ -8,12 +8,6 @@ namespace Infrastructure
|
|||||||
{
|
{
|
||||||
public static class ServiceCollectionExtensions
|
public static class ServiceCollectionExtensions
|
||||||
{
|
{
|
||||||
/// <summary>
|
|
||||||
/// Ajout des services pour la gestion de notre domaine fonctionnel avec les implémentations
|
|
||||||
/// à base d'Entity Framework Core.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="services"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public static IServiceCollection AddHNServicesEF(this IServiceCollection services)
|
public static IServiceCollection AddHNServicesEF(this IServiceCollection services)
|
||||||
{
|
{
|
||||||
services.AddDbContext<HNDbContext>((provider, options) =>
|
services.AddDbContext<HNDbContext>((provider, options) =>
|
||||||
@ -30,12 +24,6 @@ namespace Infrastructure
|
|||||||
return services.AddCommon();
|
return services.AddCommon();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Ajout des services pour la gestion de notre domaine fonctionnel avec les implémentations
|
|
||||||
/// en mémoire, parfait pour des tests.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="services"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public static IServiceCollection AddHNServicesInMemory(this IServiceCollection services)
|
public static IServiceCollection AddHNServicesInMemory(this IServiceCollection services)
|
||||||
{
|
{
|
||||||
var link1 = new Domain.Link("http://default.website");
|
var link1 = new Domain.Link("http://default.website");
|
||||||
@ -62,11 +50,6 @@ namespace Infrastructure
|
|||||||
return services.AddCommon();
|
return services.AddCommon();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Ajout des services communs peu importe la persistance choisie.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="services"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
private static IServiceCollection AddCommon(this IServiceCollection services)
|
private static IServiceCollection AddCommon(this IServiceCollection services)
|
||||||
{
|
{
|
||||||
services.AddTransient<LinkService>();
|
services.AddTransient<LinkService>();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user