<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>webapi on Alastair&#39;s Blog</title>
    <link>https://alastaircrabtree.com/tags/webapi/</link>
    <description>Recent content in webapi on Alastair&#39;s Blog</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-gb</language>
    <lastBuildDate>Wed, 05 Apr 2017 13:17:14 +0000</lastBuildDate>
    <atom:link href="https://alastaircrabtree.com/tags/webapi/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Cannot open VS 2015 Web project in VS 2017</title>
      <link>https://alastaircrabtree.com/posts/cannot-open-vs-2015-web-project-in-vs-2017/</link>
      <pubDate>Wed, 05 Apr 2017 13:17:14 +0000</pubDate>
      <guid>https://alastaircrabtree.com/posts/cannot-open-vs-2015-web-project-in-vs-2017/</guid>
      <description>Brand new installs of Visual Studio 2017 do not seem to be able to open some older web projects created in Visual Studio 2015 or before. To fix you need to add one line to your csproj file.
The problem When you open the solution in VS 2017 the project will not be loaded. If you try and right click and reload the project check the output window to see the following error:</description>
    </item>
    <item>
      <title>Implementing the retry pattern for async tasks in c#</title>
      <link>https://alastaircrabtree.com/posts/implementing-the-retry-pattern-for-async-tasks-in-c/</link>
      <pubDate>Fri, 02 Dec 2016 18:09:00 +0000</pubDate>
      <guid>https://alastaircrabtree.com/posts/implementing-the-retry-pattern-for-async-tasks-in-c/</guid>
      <description>This post is a follow on from Implementing a simple retry pattern in c#.
Tasks, async and await are rapidly becoming be default API flavours in many dotnet libraries and the performance benefits for IO bound code have been well documented. However if you need to apply the retry pattern to some async or task returning method invocation you need to watch out for subtle errors. I&amp;rsquo;ll outline the problem and revise my solution from the previous post.</description>
    </item>
    <item>
      <title>Choose the right return type for WebApi controllers</title>
      <link>https://alastaircrabtree.com/posts/choose-the-right-return-type-for-webapi-controllers/</link>
      <pubDate>Mon, 30 May 2016 13:57:17 +0000</pubDate>
      <guid>https://alastaircrabtree.com/posts/choose-the-right-return-type-for-webapi-controllers/</guid>
      <description>WebApi controller actions can return a variety of response types: HttpResponseMessage, IHttpActionResult, CLR objects and then the Task based variety of each for async actions. But which one is best? And how do we unit test them? Lets look at each in turn and examine why IHttpActionResult is usually the right choice.
Synchronous controllers returning objects The simplest web api controller can directly return the object in question. Say you have a ProductController that is concerned with CRUD operations on Products, it might have a method like the below:</description>
    </item>
  </channel>
</rss>
