mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-02 08:01:10 +00:00
Adds the capability of adding a Book via API
This commit is contained in:
1 parent
6459b6f2c2
commit
0eb7b453f6
61 files changed
+1276
-255
No files matched your search
@@ -3,6 +3,8 @@ using Lumina.Application.Common.Behaviors;
|
||||
using Mediator;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using FluentValidation;
|
||||
using MapsterMapper;
|
||||
using Mapster;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Application.Common.DependencyInjection;
|
||||
@@ -32,6 +34,12 @@ public static class ApplicationLayerServices
|
||||
// register fluent validators
|
||||
services.AddValidatorsFromAssembly(typeof(ApplicationLayerServices).Assembly);
|
||||
|
||||
// register mapster configs in this assembly
|
||||
var mapsterConfig = TypeAdapterConfig.GlobalSettings;
|
||||
mapsterConfig.Scan(typeof(ApplicationLayerServices).Assembly);
|
||||
services.AddSingleton(mapsterConfig);
|
||||
services.AddScoped<IMapper, ServiceMapper>();
|
||||
|
||||
return services;
|
||||
}
|
||||
#endregion
|
||||
|
||||
Reference in new issue
Block a user