9.1.1 Creating a Custom Model Binder; Listing 9-2 Registering the CartModelBinder Class in the Global.asax.cs File
This commit is contained in:
parent
1bb96ab788
commit
767b09def1
@ -4,6 +4,8 @@ using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Routing;
|
||||
using SportsStore.Domain.Entities;
|
||||
using SportsStore.WebUI.Infrastructure.Binders;
|
||||
|
||||
namespace SportsStore.WebUI
|
||||
{
|
||||
@ -13,6 +15,7 @@ namespace SportsStore.WebUI
|
||||
{
|
||||
AreaRegistration.RegisterAllAreas();
|
||||
RouteConfig.RegisterRoutes(RouteTable.Routes);
|
||||
ModelBinders.Binders.Add(typeof(Cart), new CartModelBinder());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user