When I trying to retrieve data from the database (SQL server/entity framework), I got below error:
The "==" operator cannot be used for operands of ("enumDropDown") or "int" operations.
and I can't write the query in the controller well, it throws me an error
nearDropdownClassList == 2
.
Controller: (i tried)
var listaOdbioruNadgodzin = _ecpContext.Karta.Where(x => x.Login == userName && x.DropdownClassList== 2)
Model:
public partial class modelCard
{
public enumDropDown? DropdownClassList{ get; set; }
}
public enum enumDropDown
{
test1 = 1,
test2 = 2,
test3 =3
}