Nucleus .Net Core CMS

ModelStateExtensions Class

Namespace: Nucleus.Extensions
Assembly: Nucleus.Extensions.dll
Extensions used to read and manipulate a Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary.
Remove<T0, T1> (ModelStateDictionary modelState, Expression<T0> expression)
Remove an item from model state, specified by an expression.
Parameters
Name Type
modelState Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary
expression System.Linq.Expressions.Expression<T0>
RemovePrefix (ModelStateDictionary modelState, String prefix)
Remove all items with the specifed prefix from model state
ToErrorString (ModelStateDictionary modelState)
Convert a ModelStateDictionary to a comma-separated string, suitable for on-screen display.