score:1

Accepted answer

usually, the approach for filtering data like this is with cumulative query composition; for example:

iqueryable<psearchmodel> query =
    from kb in db.kimlik_bilgileri
    join dbilgi in db.dil_bilgisi on kb.id equals dbilgi.kimlikid
    join okbil in db.okul_bilgileri on kb.id equals okbil.kimlikid
    join kurbil in db.kurum_bilgileri on kb.id equals kurbil.kimlikid
    join ens in db.enstitu on kurbil.kurum_id equals ens.id
    join kadr in db.kadro_unvan on kurbil.kadro_id equals kadr.id
    where kb.aktifmi == true
    select new psearchmodel
    {
        dilbilgisi = dbilgi,
        // diller =  dil,
        okulbilgileri = okbil,
        kadrounvan = kadr,
        enstitu = ens,
        kimlikbilgileri = kb,
        kurumbilgileri = kurbil
    };

if (!yabancidil.isnullorwhitespace())
{
    int dil_di = convert.toint32(yabancidil);
    query = query.where(o => o.dilbilgisi.dil_id == dil_di);
}
// ... add other filters here

var list = query.tolist();

this defers all execution to the end, and allows you to inspect dil_di when debugging, to see if it is what you expect. if you still don't get what you expect, then you'll have to investigate what sql is being issued, to see why your results are different from your expectations.

score:1

you could search in your list with linq as well. one possibility is this:

yourlistobject.where(c=>c.test.equals("hallo"))

also possible to order or group by equivalent to this.


Related Query

More Query from same tag