var itemOne
is a
Decimal
. You say, at the end of the query for
itemOne
that it should select
n.CodeNo
. So you are selecting a
Decimal
, not a
TimeTable
(which I think you want to actually select).
In the
itemTwo
query you want to look where
itemOne
(a
TimeTable Decimal.Contains(AddCode)
. Well, a
Decimal
does not have a
Contains Function
, so it will never find it!
var itemOne = from n in db.TimeTable
where n.CodeNo == code
select n;
var itemTwo = from p in db.Address
where (itemOne.Contains(p.AddCode))
select p;
I think that will solve your problem. To make sure what the type of
itemOne
and
itemTwo
are hoover over the
var
keyword in front of it.
Hope that helps! :)