Custom DateTime Model Binding in ASP.NET Core Web API
Write a custom DateTime model binder using ASP.NET Core Web API. The default binding mechanism will not work for custom URL friendly date formats …
Write a custom DateTime model binder using ASP.NET Core Web API. The default binding mechanism will not work for custom URL friendly date formats …
Write a custom DateTime model binder using ASP.NET Web API. The default binding mechanism will not work for custom URL friendly date formats …
The ASP.NET Web API pipeline decides the media formatter to use depending on the request. This complex decision making process occurs during the content negotiation and is handled by the DefaultContentNegotiator. If we need to support only a single format, say JSON, we can replace the default negotiator with …
In ASP.NET MVC the current IPrincipal can be automatically made available to action methods by implementing the System.Web.Mvc.IModelBinder interface and returning the current authenticated user from HttpContext.User. We can accomplish the same in Web API using the HttpParameterBinding class. namespace App.Web.Http.Helpers { public …
The CsvMediaTypeFormatter on Github makes it possible to support text/csv media type to the Web API stack. However, I wanted to rewrite it using the ToCsv() extension method from my earlier post. …