2016-07-06 8 views
0

sub_employee ist die Klasse des Datenbankkontextes. IM.getAvailableList() gibt ein int-Array von WSDL zurück. Ich möchte eine Liste von Modell Items finden, deren SE_ID gleich dem int array item.below ist. Action method ruft nur SE_ID ab.So finden Sie das richtige Modellelement aus der Liste

public ActionResult Ataxi() 
    { 
     var alist = IM.getAvailableList().Select(x => new sub_employee { SE_ID = x }).ToList(); 
     return View(alist); 
    } 

Kann jemand mir helfen, dieses Problem zu lösen. danke

+0

Wollen Sie so etwas wie: 'var alist = IM.getAvailableList() Wo (x => x.SE_ID == id}) ToList();.. '? –

+0

das ist nicht was wollen. Ich möchte eine Liste von sub_Mitarbeitern, die in der getAvailable() -Methode verfügbar sind – Thush234

+0

Versuchen Sie dies 'var alist = IM.getAvailableList(). Where (x => x.SE_ID == id}) .Wählen Sie (y => y_mitarbeiter). ToList(); ' –

Antwort

0

Try this:

public ActionResult Ataxi(int id) 
{ 
    var alist = IM.getAvailableList().Select(x => new sub_employee { SE_ID = id}).ToList(); 
    return View(alist); 
    } 
Verwandte Themen