aboutsummaryrefslogtreecommitdiffstats
path: root/src/Program.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Program.cs')
-rw-r--r--src/Program.cs7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/Program.cs b/src/Program.cs
index 7fd2903..0f54b87 100644
--- a/src/Program.cs
+++ b/src/Program.cs
@@ -1,9 +1,7 @@
global using I2R.LightNews.Services;
global using I2R.LightNews.Models;
global using IOL.Helpers;
-using System.Text.Json.Serialization;
using I2R.LightNews;
-using Microsoft.AspNetCore.Http.Json;
var builder = WebApplication.CreateBuilder(args);
@@ -12,10 +10,6 @@ builder.Services.AddHttpClient<NrkNewsService>();
builder.Services.AddMemoryCache();
builder.Services.AddScoped<NrkNewsService>();
builder.Services.AddScoped<NrkRadioService>();
-builder.Services.Configure<JsonOptions>(options => {
- options.SerializerOptions.DefaultIgnoreCondition = JsonIgnoreCondition.Never;
- options.SerializerOptions.PropertyNameCaseInsensitive = true;
-});
builder.Services.AddControllers();
builder.Services.AddRazorPages().AddRazorRuntimeCompilation();
@@ -26,5 +20,6 @@ app.UseStatusCodePages();
app.UseRouting();
app.MapRazorPages();
app.MapControllers();
+Dapper.DefaultTypeMap.MatchNamesWithUnderscores = true;
RadioIndexDb.CreateIfNotExists();
app.Run(); \ No newline at end of file