Skip to content

Commit

Permalink
README cs
Browse files Browse the repository at this point in the history
  • Loading branch information
marcusturewicz committed Aug 29, 2021
1 parent c75ef45 commit efc4939
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Useful for ensuring consistent Date format contracts in RESTful APIs. `IsoDateMo

1. In single Controller actions:

```chsarp
```cs
[HttpGet]
public IActionResult Get([ModelBinder(typeof(IsoDateModelBinder))] DateTime date) {
return Ok("Date is in ISO format");
Expand All @@ -43,7 +43,7 @@ public IActionResult Get([ModelBinder(typeof(IsoDateModelBinder))] DateTime date

2. Set globally in the application via Startup:

```chsarp
```cs
public override void ConfigureServices(IServiceCollection services) {
services.AddControllers(options => {
options.ModelBinderProviders.Insert(0, new IsoDateModelBinderProvider());
Expand Down

0 comments on commit efc4939

Please sign in to comment.