Skip to content

Commit

Permalink
Minor documentation updates
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexPaskhin committed Sep 29, 2019
1 parent df31458 commit fabddf7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Mvc.Formatters.Xml.Extensions/samples/WebXmlResult/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ public Startup(IConfiguration configuration)
// This method gets called by the runtime. Use this method to add services to the container.
public void ConfigureServices(IServiceCollection services)
{
services.AddControllers()
// "AddXmlFormaterExtensions()" initialize the Asp .Net Core MVC to use of XmlResult and FromXmlBody:
// - It adds the XmlSerializer and DataContractSerializer formatters to MVC.
// - It adds the XmlResult and FromXmlBody Extension to MVC.
.AddXmlFormaterExtensions()
.AddNewtonsoftJson();

//services.AddMvc().AddXmlFormaterExtensions().AddNewtonsoftJson();
services.AddControllers().AddXmlFormaterExtensions().AddNewtonsoftJson();
}

// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ public void ConfigureServices(IServiceCollection services)
// "AddXmlFormaterExtensions()" initialize the Asp .Net Core MVC to use of XmlResult and FromXmlBody:
// - It adds the XmlSerializer and DataContractSerializer formatters to MVC.
// - It adds the XmlResult and FromXmlBody Extension to MVC.
services.AddMvc().AddXmlFormaterExtensions();
// or services.AddControllers().AddXmlFormaterExtensions().AddNewtonsoftJson();
}
```

Expand Down

0 comments on commit fabddf7

Please sign in to comment.