Home > TwoRingBinder

TwoRingBinder

TwoRingBinder is a project mainly written in JAVASCRIPT and C#, it's free.

The last Custom ModelBinder for ASP.NET MVC you'll ever need. TwoRingBinder let's you create classes to hook into ModelBinding automatically

TwoRingBinder is a Custom ModelBinder for ASP.NET MVC

Installation & Usage

1) Add the ModelBinder to your Application_Start event, via: ModelBinders.Binders.DefaultBinder = new TwoRingBinder.Core.ModelBinder();

2) Create your Models

3) Create one or more implementations of IBindModelExtension for your Models

4) Your implementation Pre & Post Bind Model events will now be invoked by the ModelBinder.
The default binding will still occur.

...OR...

1) Add the ModelBinder to your Application_Start event, via: ModelBinders.Binders.DefaultBinder = new TwoRingBinder.Core.ModelBinder();

2) Create your Models

3) Create a OnBound Method on your Model that will be invoked when it is Bound

Notes

If no implementation of IBindModelExtension is found for your Model, it will be bound normally.

The two methods of IBindModelExtension are void so feel free to just define the method's signature if you don't want to use it.

Let me know if you have any questions or suggestions!

[email protected]