public static TableRoad ZnajdzDroge(string id1, string id2) { TableRoad droga = tableRoad.Select(n => n).Where(x => (x.GetIdLoc_1() == id1 && x.GetIdLoc_2() == id2) || (x.GetIdLoc_1() == id2 && x.GetIdLoc_2() == id1)).FirstOrDefault(); return(droga); }
public static TableRoad ZnajdzDroge(string id) { TableRoad droga = tableRoad.Select(n => n).Where(x => x.GetId() == id).FirstOrDefault(); return(droga); }