I have a dropdown in my view that I fill in as follows:
ViewBag.NfeStatus = EnumHelper
.ListAll<NfeStatus>()
.ToSelectList(x => x, x => x.Description());
My NfeStatus model is an enum:
public enum NfeStatus
{
[Description("-")]
NotIssued = 0,
[Description("Pendente")]
Pending,
[Description("Erro")]
Error,
[Description("Ok")]
Ok
}
However, I would like to not display the "OK" option.
How do I accomplish this?