Model binding can now handle nullable enums. Bug (https://github.com/aspnet/WebFx/issues/256) was fixed to address this.

Deleting the comment and uncommenting the sample code.
This commit is contained in:
Praburaj 2014-04-28 11:01:46 -07:00
parent 647ac5dac0
commit a0f5369a20
1 changed files with 1 additions and 3 deletions

View File

@ -116,9 +116,7 @@ namespace MusicStore.Controllers
//
// GET: /Account/Manage
[HttpGet]
//Bug: https://github.com/aspnet/WebFx/issues/256. Unable to model bind for a nullable value. Work around to remove the nullable
//public async Task<IActionResult> Manage(ManageMessageId? message)
public async Task<IActionResult> Manage(ManageMessageId message)
public async Task<IActionResult> Manage(ManageMessageId? message)
{
ViewBag.StatusMessage =
message == ManageMessageId.ChangePasswordSuccess ? "Your password has been changed."