Hi,
On a form I have an input where tags are inserted in a CSV format.
Then on my code I convert the CSV string to a List<Tag>. Tag is an
object with two properties: TagID and Name
So when I do the conversion I only fill the Tags names ...
Then I use a join to find these tags into my database.Tags and get
their ID's.
This is what I have:
// Parse form post tags
List<Tagform = paper.Tags.Split(new char[] {','},
StringSplitOptions.RemoveEmptyEntries).Select(t =new Tag { Name =
t.Trim() }).ToList();
// Define updated post tags
List<Tagupdated = new List<Tag>(from t in database.Tags
join f in form on t.Name
equals f.Name
select t).ToList();
I debugged and the "form" list has the names of the tags I inserted.
And those names do exist in database.Tags.
However, I always get the following error on my second query:
Local sequence cannot be used in LINQ to SQL implementation of query
operators except the Contains() operator.
I have no idea why do I get this. My code seems ok ... I tried
everything I could think of to solve this.
Does anyone knows why do I get this?
Thanks,
Miguel