This post is part 4 of the Web API and OData V4 series. This article shows how Web API 2.2 with OData V4 supports enum in entities or as return values and also supports enum parameters for functions. Part 1 Getting started with Web API and OData V4 Part 1. Part 2 Web API and […]

This article demonstrates how simple CRUD operations can be mapped to an OData service, how to map DateTimeOffset to DateTime types in the entity framework and also how to create OData actions for Entities and Entity Collections. This post is part 3 of the Web API and OData V4 series. Part 1 Getting started with […]

This post continues on from Getting started with Web API and OData V4. Part 1 Getting started with Web API and OData V4 Part 1. Part 2 Web API and OData V4 Queries, Functions and Attribute Routing Part 2 Part 3 Web API and OData V4 CRUD and Actions Part 3 Part 4 Web API […]

This article demonstrates how to create an OData V4 Web API service which uses Entity Framework 6 and SQL 2014 for persistence. OData V4 was released with Web API 2.2. The OData V4 standard is documented here: http://www.odata.org/documentation/. The Web API implementation does supports a lot of features from the standard, but not all. Part […]

This blog provides a simple template or example of a windows service which hosts a SignalR service. Code: https://github.com/damienbod/SignalRWSelfHostingWindowsServiceTemplate The Start and Stop methods used by the Windows Service use a long running Task which can be cancelled. SignalR is self hosted in OWIN. The main method of the service just starts the service. If […]

This article demonstrates how to setup an OAuth2 code flow example using GitHub as an authorization server and a Web API service as a resource server. Thanks to Jerrie Pelser and Thinktecture for providing code and blogs which made it easy to research this and setup a working example. Code: https://github.com/damienbod/WebAppGitHubCodeFlow Setting up GitHub OAuth2 […]

This article explores the different possibilities for caching Web API services. At present Microsoft do not support any decent cache solution for Web API. This might change with vNext when MVC and Web API come together as MVC already has an Output Cache for controllers. Code: https://github.com/damienbod/WebAppCacheCow At present, I know of 3 different ways […]

This article demonstrates how to set up a Web API 2 excel file download using OAuth2 Implicit Flow. The application requires an Authorization Server and Identity Server V2 from Thinkteckture and also the excel Media Formatter from WebApiContrib. leastprivilege.com provided a lot of blogs which helped complete this article. Thanks for those blogs. The article […]

This post a collection of information which I found all over the internet. I’m posting it as a reference for myself. I need to set up a development environment where a team of developers can develop multiple projects which use and test Web applications using HTTPS. Step 1: Create a root cert. This will be […]

The article demonstrates how to use Web API Tracing, and trace the data using SLAB, in-process or out-of-process to a flat file or an Elasticsearch sink. Semantic.Logging from Enterprise Library now includes an Elasticsearch sink. The NuGet package also includes an implementation of the IExceptionLogger interface and a logging ActionFilter which logs the data using […]