Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;

Expand Down Expand Up @@ -40,7 +41,7 @@ public static IServiceCollection AddRequiredMvcComponents(this IServiceCollectio
{
// options.Filters.Add<ApiExceptionFilter>();
});
// mvcBuilder.SetCompatibilityVersion(CompatibilityVersion.Version_2_2);
mvcBuilder.SetCompatibilityVersion(CompatibilityVersion.Version_2_2);
//var mvcBuilder = services.AddMvcCore(options =>
//{
// options.Filters.Add<ApiExceptionFilter>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
using System.Reflection;
using MaxMind.Db;
using O2.OnTracker.Api.Setup;
using O2.Tracker.DbUtility;

namespace O2.Tracker.DbUtility
namespace O2.OnTracker.Api
{
public sealed class MaxMindLocalGeoIpAddressResolver : IGeoIpAddressResolver
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
<TargetFramework>netcoreapp2.2</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand All @@ -10,7 +10,7 @@

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Microsoft.AspNetCore.Razor.Design" Version="2.1.2" PrivateAssets="All" />
<PackageReference Include="Microsoft.AspNetCore.Razor.Design" Version="2.2.0" PrivateAssets="All" />
</ItemGroup>

<ItemGroup>
Expand Down
14 changes: 2 additions & 12 deletions src/Services/on-tracker/O2.OnTracker.Api/Startup.cs
Original file line number Diff line number Diff line change
@@ -1,17 +1,7 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.HttpsPolicy;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
using O2.OnTracker.Api.IoC;
using O2.OnTracker.Api.Setup;
using O2.Tracker.DbUtility;
Expand All @@ -30,7 +20,7 @@ public Startup(IConfiguration appConfiguration)
// This method gets called by the runtime. Use this method to add services to the container.
public void ConfigureServices(IServiceCollection services)
{
services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1);
services.AddRequiredMvcComponents();
// services.AddSingleton<IGeoDbSetting, GeoDbSetting>();
services.ConfigurePOCO<GeoDatabase>(AppConfiguration.GetSection("GeoDatabase"));
services.AddScoped<IGeoIpAddressResolver, MaxMindLocalGeoIpAddressResolver>();
Expand Down