Witam
w modelu mam
[DisplayName("Kategoria pliku")]
public Kategoria Kategoria { get; set; }
public enum Kategoria
{
Ikona, // 0
Miniatura, // 1
Slider, // 2
Załącznik, // 3
Zdjecie // 4
}
jak pisze zapytanie do bazy
public ActionResult Index(int kat)
{
return View((from o in _db.BibliotekaBIN where o.Kategoria == kat select o).ToList());
}
mam następujący błąd Operator '==' cannot by appled to operands of type 'Kategoria' and 'int'.
w tabeli Kategoria jest typu INT.
dane to wartości od 0 do 4
Jak powinno wyglądać poprawne zapytanie?
Dzieki