SES-70 Added Automapper and Profiles #16

Merged
s426135 merged 3 commits from SES-70 into master 2020-12-06 15:33:15 +01:00
2 changed files with 4 additions and 0 deletions
Showing only changes of commit a35e2ed567 - Show all commits

View File

@ -13,6 +13,8 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <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.AspNetCore.SpaServices.Extensions" Version="5.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="5.0.0" /> <PackageReference Include="Microsoft.EntityFrameworkCore" Version="5.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" 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.Configuration;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Hosting;
using AutoMapper;
using SessionCompanion.Configurations; using SessionCompanion.Configurations;
using SessionCompanion.Database; using SessionCompanion.Database;
using SessionCompanion.Hubs; using SessionCompanion.Hubs;
@ -32,6 +33,7 @@ namespace SessionCompanion
Configuration.GetConnectionString("DefaultConnection"))); Configuration.GetConnectionString("DefaultConnection")));
services.AddRepositories(); services.AddRepositories();
services.AddServices(); services.AddServices();
services.AddAutoMapper(typeof(Startup));
services.AddSignalR(); services.AddSignalR();
// In production, the Angular files will be served from this directory // In production, the Angular files will be served from this directory
services.AddSpaStaticFiles(configuration => services.AddSpaStaticFiles(configuration =>