The Nuget package with some MVC (.NET Framework) helpers
.NET Framework MVC Helpers library
dotnet add package EditoraInovacao.MVC
- Controller
- EmptyController
- EnumFlagsModelBinder
- ExtendedSelectListItem
- NewtonsoftJsonResult
- ViewRenderer
A base controller that adds two results:
- JsonResult - Generates a NewtonsoftJsonResult result.
- ErrorResponse - Generates a JsonResult with ErrorResponse type, including custom code, custom error message and any ModelState errors key/message pair.
An empty controller class that derives from Controller.
Adds a model binder that enables binding of a flag enum in the model, allowing multiple flag selection.
A class that extends the System.Web.Mvc.SelectListItem with a new property named HtmlAttributes that can be used with ViewHelpers to send custom HTML properties/attributes from Model to View.
Extends JsonResult with custom JSON serialization settings.
- Formatting.Indented
- ReferenceLoopHandling.Ignore
A helper class that enables view rendering on demand. Expose the following 3 methods:
- CreateController - Creates an instance of a Controller (can be any valid controller)
- RenderView - Renders a view based on the view's name and an object as the model for that view. It uses the EmptyController as the controller.
- RenderView - Extension method for a Controller class, that renders a view based on the view's name and an object as the model for that view.
Developed by Guilherme Branco Stracini for Editora Inovação
© 2012 ~ 2023 All rights reserved.