I suggest:
(1) Do not use an anonymous type to generate personeller
as you did in the controller as follows:
(x, y) => new // this will create anonymous type object. Don't do so.
{
personeladi=y.personelAdSoyad,
personelKullaniciadi=y.personelKullaniciAd,
tur = x.personelTuru,
personeltel=y.personelTelno,
personeleposta= y.personelEposta
}
(2) Define custom class like below to transfer the data form controller to view:
public class DTO
{
public string personeladi { get; set; }
public string personelKullaniciadi { get; set; }
public string tur { get; set; }
public string personeltel { get; set; }
public string personeleposta { get; set; }
}
(3) Modify the code of (1) above to use the above class (not anonymous type) as follows:
(x, y) => new DTO // Create DTO object, not anonymous type object
{
personeladi=y.personelAdSoyad,
personelKullaniciadi=y.personelKullaniciAd,
tur = x.personelTuru,
personeltel=y.personelTelno,
personeleposta= y.personelEposta
}