Excel on Azure

  I amended my open-source CsvTools with an Excel reader. Once I read the excel worksheet into a datatable, I can use all the data table operators from the core CsvTools, including enumeration, Linq over the rows, analysis, mutation, and saving back out as a CSV. So this gives be a Linq-to-Excel on Azure experience,…

6

How to create a custom value provider in WebAPI

Here’s how you can easily customize WebAPI parameter binding to include values from source other than the url.  The short answer is that you add a custom ValueProvider and use Model Binding, just like in MVC. ValueProviders are used to provide values for simple types and match on parameter name.  ValueProviders serve up raw pieces…

1

How to bind to custom objects in action signatures in MVC/WebAPI

MVC provides several ways for binding your own arbitrary parameter types.  I’ll describe some common MVC ways and then show how this applies to WebAPI too. You can view this as a MVC-to-WebAPI migration guide.  (Related reading: How WebAPI binds parameters ) Say we have a complex type, Location, which just has an X and…

4

MVC Style parameter binding for WebAPI

I described earlier how WebAPI binds parameters. The entire parameter binding behavior is determined by the IActionValueBinder interface and can be swapped out. The default implementation is DefaultActionValueBinder. Here’s another IActionValueBinder that provides MVC parameter binding semantics. This lets you do things that you can’t do in WebAPI’s default binder, specifically: ModelBinds everything, including the…

8

How WebAPI does Parameter Binding

Here’s an overview of how WebAPI binds parameters to an action method.  I’ll describe how parameters can be read, the set of rules that determine which technique is used, and then provide some examples.   [update] Parameter binding is ultimately about taking a HTTP request and converting it into .NET types so that you can…

9