Skip to content

Commit

Permalink
Use newtonsoft as json parser for api
Browse files Browse the repository at this point in the history
  • Loading branch information
Jowindebondt committed May 31, 2024
1 parent 5244a9b commit e7dcfc3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Server/TournamentManager.Api/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@
using TournamentManager.Application;
using TournamentManager.Application.Repositories;
using TournamentManager.Infrastructure;
using Microsoft.AspNetCore.Mvc.NewtonsoftJson;

var builder = WebApplication.CreateBuilder(args);

var connectionString = builder.Configuration.GetConnectionString("SQLAZURECONNSTR_DefaultConnection");
builder.Services.AddDbContext<ApplicationDbContext>(options => options.UseSqlServer(connectionString));
builder.Services.AddControllers();
builder.Services.AddControllers().AddNewtonsoftJson();
// Add services to the container.
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
builder.Services.AddEndpointsApiExplorer();
Expand Down
1 change: 1 addition & 0 deletions Server/TournamentManager.Api/TournamentManager.Api.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="8.0.6" />
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="8.0.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.1" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.4.0" />
Expand Down

0 comments on commit e7dcfc3

Please sign in to comment.