I in the controller combined the two lists in this way
public ActionResult Device() { AD methodGetList = new AD(); ViewBag.Current = "Device"; ViewBag.Title = "Сеть"; var adList = methodGetList.GetListFromAD(); var deviceList = db.devices.ToList(); var all = from a in adList join d in deviceList on a.DisplayName equals d.DisplayName select new { a , d }; ViewBag.NewList = all.ToList(); return View(); } I looked in the debugger, everything seemed to be all right, but how can I put all this into view?
Try so
@foreach (var items in ViewBag.NewList) { <tr> <td>@items.a.Organization</td> </tr> } But there is no data, without the same situation. Data that is
