Initial commit: NexusArchitect Professional Workstation Overhaul
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
using Mapster;
|
||||
using MapsterMapper;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using System.Reflection;
|
||||
|
||||
namespace NexusReader.Application.Mappings;
|
||||
|
||||
public static class MappingConfig
|
||||
{
|
||||
public static IServiceCollection AddMapsterConfiguration(this IServiceCollection services)
|
||||
{
|
||||
var config = TypeAdapterConfig.GlobalSettings;
|
||||
|
||||
// Manual registration for AOT (or use Source Generator)
|
||||
// config.NewConfig<Source, Destination>();
|
||||
|
||||
services.AddSingleton(config);
|
||||
services.AddScoped<IMapper, ServiceMapper>();
|
||||
|
||||
return services;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user