I have a DTO Class
[Serializable]
public class PerfilDTO
{
public int Codigo { get; set; }
public string Descricao { get; set; }
public SituacaoEnum Situacao { get; set; }
public List<PerfilFuncionalidadeDTO> PerfilFuncionalidade { get; set; }
}
And in this DTO I have my SituacaoEnum
which is the one below:
public enum SituacaoEnum
{
[Description("Ativo")]
Ativo = 1,
[Description("Inativo")]
Inativo = 2
}
In my view I have the following:
@model IEnumerable<ControleAcesso.PerfilDTO>
an html any e:
@Html.DropDownListFor(this.Model.First().Situacao)
How to make a dropDown from what I have?