I\'m trying to create a dropdown list with an enum property in ASP.NET MVC Core using the tag helper in a Razor view:
Here is the model:
public class Per
You can simply use Razor syntax:
@Html.DropDownList("StudentGender", Html.GetEnumSelectList(), "Select Gender",new { @class = "form-control" })