Files
Examples/GerstITS.Examples.Api/Module.Mvc.cs
2021-06-15 10:59:47 +02:00

22 lines
642 B
C#

using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.DependencyInjection;
namespace GerstITS.Examples.Api
{
public sealed partial class Module
{
#region Methods
private static void RegisterMvc(IServiceCollection container)
{
//container.AddTransient<IConfigureOptions<MvcOptions>, ApiMvcOptions>();
//container.AddTransient<IConfigureOptions<MvcNewtonsoftJsonOptions>, MvcJsonOptions>();
container.AddMvc()
.AddNewtonsoftJson()
.SetCompatibilityVersion(CompatibilityVersion.Latest);
}
#endregion
}
}