diff options
| author | transtrike <transtrike@gmail.com> | 2020-12-17 19:37:38 +0200 |
|---|---|---|
| committer | transtrike <transtrike@gmail.com> | 2020-12-17 19:37:38 +0200 |
| commit | 33a1a5899a16378691cd62d9ee4644db2a02e2b7 (patch) | |
| tree | 20410322225b99a6a44576cfdfb6729423d0855f /src/DevHive.Web/Configurations/Extensions/ConfigureAutoMapper.cs | |
| parent | 94a3b0661106e91ab3a1a523af3c60df131a4f63 (diff) | |
| download | DevHive-33a1a5899a16378691cd62d9ee4644db2a02e2b7.tar DevHive-33a1a5899a16378691cd62d9ee4644db2a02e2b7.tar.gz DevHive-33a1a5899a16378691cd62d9ee4644db2a02e2b7.zip | |
RoleModel moved to DevHive.Common
Diffstat (limited to 'src/DevHive.Web/Configurations/Extensions/ConfigureAutoMapper.cs')
| -rw-r--r-- | src/DevHive.Web/Configurations/Extensions/ConfigureAutoMapper.cs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/DevHive.Web/Configurations/Extensions/ConfigureAutoMapper.cs b/src/DevHive.Web/Configurations/Extensions/ConfigureAutoMapper.cs index afba39c..b6ebc63 100644 --- a/src/DevHive.Web/Configurations/Extensions/ConfigureAutoMapper.cs +++ b/src/DevHive.Web/Configurations/Extensions/ConfigureAutoMapper.cs @@ -1,6 +1,7 @@ using System; using AutoMapper; using AutoMapper.Configuration; +using Microsoft.AspNetCore.Builder; using Microsoft.Extensions.DependencyInjection; namespace DevHive.Web.Configurations.Extensions @@ -11,5 +12,13 @@ namespace DevHive.Web.Configurations.Extensions { services.AddAutoMapper(AppDomain.CurrentDomain.GetAssemblies()); } + + public static void UseAutoMapperConfiguration(this IApplicationBuilder app) + { + var config = new MapperConfiguration(cfg => + { + cfg.AllowNullCollections = true; + }); + } } }
\ No newline at end of file |
