Added AutoMapper

This commit is contained in:
Łukasz Góreczny 2020-12-06 11:28:57 +01:00
parent e6a6ac290a
commit a35e2ed567
2 changed files with 4 additions and 0 deletions

View File

@ -13,6 +13,8 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="AutoMapper" Version="10.1.1" />
<PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="8.1.0" />
<PackageReference Include="Microsoft.AspNetCore.SpaServices.Extensions" Version="5.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="5.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="5.0.0">

View File

@ -7,6 +7,7 @@ using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using AutoMapper;
using SessionCompanion.Configurations;
using SessionCompanion.Database;
using SessionCompanion.Hubs;
@ -32,6 +33,7 @@ namespace SessionCompanion
Configuration.GetConnectionString("DefaultConnection")));
services.AddRepositories();
services.AddServices();
services.AddAutoMapper(typeof(Startup));
services.AddSignalR();
// In production, the Angular files will be served from this directory
services.AddSpaStaticFiles(configuration =>