First time here? You are looking at the most recent posts. You may also want to check out older archives or the tag cloud. Please leave a comment, ask a question and consider subscribing to the latest posts via RSS. Thank you for visiting! (hide this)

webapi

There are 4 entries for the tag webapi

Using Entity Framework within an Owin-hosted Web API with Unity

After quite a lot of time of writing applications without direct interaction with Databases, lately I’ve been working on a pretty simple ASP.NET Web API project that needs to save data on a database. Despite the simplicity of the application, I faced some interesting problems, which I’m going to write about in a few blog posts over the next weeks. The first of the problems, which I’m going to write about in this post, is how to configure an ASP.NET Web API application to run within Owin, have its dependencies resolved with Unity, and have Entity Framework DbContext injected...

Using web api client in synchronous methods and some good async/await resources

Lately I’ve been trying to include a call to a REST service using the WebAPI client to a library already used from inside both an ASP.NET page and a WCF service. The problem with mixing sync and async Of course I started with an async/await code: HttpResponseMessage response = await client.PostAsJsonAsync(GetUpdateUri(), payload); Unfortunately both consumers were synchronous, so I had to wait for the async to complete before going on with the execution: so I did something that proved to be wrong (the following methods calls the line...

The “modern” ASP.NET web stack is fully opensource: ASP.NET MVC, Web API, ASP.NET WebPage and Razor

Still getting my head around this early morning (in Europe timezone) announcement on ScottGu’s blog: ASP.NET MVC, Web API, Razor and Open Source. Some of you might remember that almost 3 years ago the announced that ASP.NET MVC v1 was being released under the MS-PL license, thus making it opensource. That turned out to be just a source snapshot of each public release, and were not accepting contributions, so, a “partial” commitment to open source. This time is different: the source code is available from the “live” repository the ASP.NET team is working on, and they are going...

Web API preview 6 is out: how to get a RESTful mind

As you may or may not have heard, yesterday WCF Web API preview 6 has been released. If you never heard about it I recommend you read the quick introduction on CodePlex, but basically it is a facility that helps you expose your services over the web, taking advantage of the richness of the HTTP protocol, in a RESTful way (vs using SOAP or other abstraction layers). Getting started resources on Web API To quickly get started with it you can download the code and samples, and download the compiled CHM for a more conceptual and step...