New Release Candidate Update For ASP.Net MVC 5, Web API 2 and Web Pages 3

Introduction

Last week the Microsoft ASP.NET team released the latest updates for ASP.NET MVC 5, Web API 2 and Web Pages 3. Now the ASP.NET MVC 5.2, Web API 2.2 and Web Pages 3.2 are available on the NuGet gallery.

Prerequisites

There are the following prerequisites to use these updates:

Download

You can install this releases or update your versions to ASP.NET MVC 5.2, ASP.NET Web API 2.2 and ASP.NET Web Pages 3.2 using the Package Manager Console.

Please enter the following commands to install:

  • Install-Package Microsoft.AspNet.Mvc -Version 5.2.0-rc -Pre
  • Install-Package Microsoft.AspNet.WebApi -Version 5.2.0-rc -Pre
  • Install-Package Microsoft.AspNet.WebPages -Version 3.2.0-rc -Pre

As an example I've installed the ASP.NET Web API rc update on the sample application:

Package Manager Console

Overview of Release

There are various new features and bug fixes included in this release that bring many more virtues to MVC, the Web API and Web Pages. Now we'll see the features that are included in this release in the following.

ASP.NET MVC 5.2 Release Candidate

There are the following features included in this release.

Attribute Routing

Now it provides an extensibility point called IDirectRouteProvider that allows full control over how attribute routes are discovered and configured. This provides a list of actions and controllers and the route information is also associated, that specifies what routing configuration is desired for those actions. The customization of the IDirectRouteProvider is easy by enhancing the default implementation of DefaultDirectRouteProvider.

Feature Updates

There are many types of feature updates available now in this release candidate version. A few of them are given below:

  • IDirectRouteProvider
  • ValidationSummary()
  • HTML DropDownlist
  • jQuery Unobtrusive Validation

There are also many types of bug fixes in this release.

ASP.NET Web API 2.2 Release Candidate

There are the following features included in this release.

OData v4 support

There are the following features added in this OData v4 protocol:

  • Support for aliasing properties in OData Model
  • Added OData function support
  • Inegrate with ODL UriParser
  • Support for open complex type
  • Added Attribute routing support

Attribute Routing

Now it provides an extensibility point called IDirectRouteProvider, that allows full control over how attribute routes are discovered and configured. This provides a list of actions and controllers and the route information is also associated that specifies what routing configuration is desired for those actions. The customization of the IDirectRouteProvider is easy by enhancing the default implementation of DefaultDirectRouteProvider.

For example of DefaultDirectRouteProvider:

using System.Collections.Generic;

using System.Web.Http;

using System.Web.Http.Controllers;

using System.Web.Http.Routing;

 

namespace WebApplication24

{

    public class BaseController : ApiController

    {

        //statements;

    }

 

    [RoutePrefix("api/values")]

    public class ValuesController : BaseController

    {

        //statements for values

    }

 

    public class CustomDirectRoute : DefaultDirectRouteProvider

    {

        protected override IReadOnlyList<IDirectRouteFactory> GetActionRouteFactories(HttpActionDescriptor action)

        {

            return action.GetCustomAttributes<IDirectRouteFactory>
(inherit: 
true);

        }

    }

}

Web API Client Support for Windows Phone 8.1

Now we can use the Web API client in Windows Phone 8.1 applications. We can easily get the Web API Client from the NuGet Gallery.

Feature Updates

There are a few types of feature updates available now in this release candidate version. A few of them are given below:

  • ApiController should accept related URI
  • Support added for Windows Phone 8.1

ASP.NET Web Pages 3.2 Release Candidate

There is a slight update in this section. The MakeTypeHelper.ObjectToDictinoary feature is updated on this release.

Summary

This article described the latest release candidate update that is available for the ASP.NET MVC 5, ASP.NET Web API and ASP.NET Web Pages. There is much more new about to come in the next CTP update in Visual Studio 2014. Thanks for reading and stay updated.

Up Next
    Ebook Download
    View all
    Learn
    View all