Skip to content

Commit

Permalink
Fixed Json Patch with NewtonsoftJson snippet. (dotnet#15431)
Browse files Browse the repository at this point in the history
  • Loading branch information
serpent5 authored and scottaddie committed Oct 31, 2019
1 parent 1772e82 commit 2232357
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions aspnetcore/web-api/jsonpatch/samples/3.0/WebApp1/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ public void ConfigureServices(IServiceCollection services)
var jsonPatchOptions = jsonPatchServiceProvider.GetRequiredService<IOptions<MvcOptions>>().Value;
var jsonPatchInputFormatter = jsonPatchOptions.InputFormatters.OfType<NewtonsoftJsonPatchInputFormatter>().First();

services.AddControllersWithViews(options => jsonPatchOptions.InputFormatters.Insert(0, jsonPatchInputFormatter));

services.AddControllersWithViews(options => options.InputFormatters.Insert(0, jsonPatchInputFormatter));
}
#endregion

Expand Down

0 comments on commit 2232357

Please sign in to comment.