EDIT - So there was a /n in the string I was trying to query. I love computers.
I need to get products that are in a category based on the categories name. If I use the category ID, it works...
from r in db.products
from pc in r.productcategories
where pc.categories.categoryid == n
select r
but this doesn't
from r in db.products
from pc in r.productcategories
where pc.categories.categoryname == n
select r
I also tried contains...
from r in db.products
from pc in r.productcategories
where pc.categories.categoryname.Contains(n)
select r
There are no errors, but no rows are returned, whereas rows are returned when I use the id.
nin your query?ndoesnot carry an id value right?nor the column type you are trying to query against in the database? (varchar,nvarchar,text)