mirror of
https://github.com/aaronpo97/the-biergarten-app.git
synced 2026-10-14 17:54:42 +00:00
Move Infrastructure.FileUpload into Features.PhotoUpload (#290)
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using Features.ImageUploads.Repository;
|
||||
using Features.ImageUploads.Services;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
namespace Features.ImageUploads.DependencyInjection;
|
||||
@@ -6,11 +7,16 @@ namespace Features.ImageUploads.DependencyInjection;
|
||||
/// <summary>Registers the services required by the PhotoUpload feature.</summary>
|
||||
public static class FeaturesPhotoUploadServiceCollectionExtensions
|
||||
{
|
||||
/// <summary>Registers <see cref="IPhotoUploadRepository" /> and its implementation.</summary>
|
||||
/// <summary>
|
||||
/// Registers <see cref="IPhotoUploadRepository" /> and <see cref="IFileStorageProvider" /> and their
|
||||
/// implementations.
|
||||
/// </summary>
|
||||
/// <returns><paramref name="services" />, for chaining.</returns>
|
||||
public static IServiceCollection AddFeaturesPhotoUpload(this IServiceCollection services)
|
||||
{
|
||||
services.AddScoped<IPhotoUploadRepository, PhotoUploadRepository>();
|
||||
services
|
||||
.AddScoped<IPhotoUploadRepository, PhotoUploadRepository>()
|
||||
.AddSingleton<IFileStorageProvider, S3FileStorageProvider>();
|
||||
return services;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user