This commit is contained in:
Yanis Hermassi 2021-03-25 20:03:40 +00:00
parent 75948d0730
commit 441e75e639
2 changed files with 10 additions and 1 deletions

View File

@ -3,6 +3,7 @@
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="AutoMapper" Version="9.0.0" />
<PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="7.0.0" />
@ -14,4 +15,5 @@
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="5.6.0" />
</ItemGroup>
</Project>

View File

@ -10,6 +10,8 @@ using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using BackEndAaaapero.Data;
using Microsoft.EntityFrameworkCore;
namespace BackEndAaaapero
{
@ -24,7 +26,12 @@ namespace BackEndAaaapero
// This method gets called by the runtime. Use this method to add services to the container.
public void ConfigureServices(IServiceCollection services)
{
{
services.AddDbContext<Context>(opt =>
{
opt.UseMySql(Configuration.GetConnectionString("DefaultConnection"));
});
services.AddControllers();
}