0

次のような生のクエリがあります。

string upit = "select f.idFilm as idFIlm, f.naziv as nazivFilm, z.naziv as nazivZanr, f.idZanr as idZanr, f.godina as godina, f.slika, f.klip <br>
from video_klub_sema.film as f <br>
inner join video_klub_sema.zanr as z on z.idZanr=f.idZanr <br>
inner join video_klub_sema.kopija as k on f.idFilm=k.idFilm where ";

if (checkBox1.Checked)
    upit += "k.nije_tu=0 ";
else
    upit += " k.nije_tu in (0,1)";

if (comboBoxGodina.SelectedIndex == 0)
    upit += " and f.godina in (select distinct godina from video_klub_sema.film)";
else
    upit += " and f.godina=" + comboBoxGodina.SelectedItem.ToString();

if (comboBoxZanr.SelectedIndex == 0)
    upit += " and f.idZanr in (select idZanr from video_klub_sema.zanr)";
else
    upit += " and f.idZanr= (select idZanr from video_klub_sema.zanr where naziv = '" + comboBoxZanr.SelectedItem.ToString() + "')";

if (textNaziv.Text != "")
    upit += " and f.naziv like '%" + textNaziv.Text + "%'";

upit += " GROUP BY f.naziv, f.idFilm, z.naziv, f.idZanr, f.godina, f.slika, f.klip";

このクエリをエンティティ フレームワーク linq クエリに変換できますか?

4

1 に答える 1