Update to .Net 8.0

This commit is contained in:
Maxime Boulay
2025-04-19 22:04:18 +02:00
parent ba64ceb471
commit 8e5c9cfffb
3 changed files with 56 additions and 14 deletions

View File

@@ -4,9 +4,8 @@ using GiecChallenge.Services;
using Microsoft.AspNetCore.Authentication.JwtBearer;
using Microsoft.IdentityModel.Tokens;
using System.Text;
using Microsoft.AspNetCore.Cors;
using Microsoft.AspNetCore.HttpOverrides;
using System.Net;
using GiecChallenge.Profiles;
var builder = WebApplication.CreateBuilder(args);
ConfigurationManager configuration = builder.Configuration;
@@ -32,7 +31,15 @@ builder.Services.AddSwaggerGen(c =>
c.ResolveConflictingActions(apiDescriptions => apiDescriptions.First());
});
builder.Services.AddAutoMapper(AppDomain.CurrentDomain.GetAssemblies());
builder.Services.AddAutoMapper(
typeof(CurrencyProfile),
typeof(GroupProfile),
typeof(LanguageProfile),
typeof(ProductProfile),
typeof(PurchaseProfile),
typeof(SubGroupProfile),
typeof(UserProfile)
);
builder.Services.AddAuthentication(options =>
{