Я разрабатываю приложение в asp. net MVC, и для отображения нескольких таблиц в одном и том же представлении я создал одну большую ViewModel, которая содержит три модели (сотрудник, пользователь и запрос) Теперь моя проблема - мой запрос, который не работает, и я не могу найти проблему
Спасибо за вашу помощь Извините за мой английский sh не подходит
My bigviewmodel
namespace freegest.Models
{
public class ControleViewModel
{
public List<employe> employes { get; set; }
public List<demande > demandes { get; set; }
public List<utilisateur> utilisateurs { get; set; }
}
}
Мой запрос
public ActionResult listdemande()
{
int id = Convert.ToInt32(Session["id_utilisateur"]);
ControleViewModel CV = new ControleViewModel();
CV = (from a in CV.utilisateurs
join b in CV.demandes
on a.id_utilisateur equals b.idutilisateur_demande
join c in CV.employes
on a.idemploye_utilisateur equals c.id_employe
orderby c.nom_employe ascending
where a.id_utilisateur == id
select new ControleViewModel
{
c.nom_employe ,
});
return View(CV);
}