title: The Property method can only be used with primitive or complex properties. Use the Reference or Collection method
body: <blockquote>
    <p>The property 'Tags' on type 'Post' is not a primitive or complex property. The Property method can only be used with primitive or complex properties. Use the Reference or Collection method.</p>
  </blockquote>
  
  <p>I am using this code snippets for update a post text and related tags:</p>
  
  <pre><code>            var tags = TagConverter.FetchTags(postText);
              var newTags = tags.Select(t =&gt; t.Title);
              var savedTags = _db.Tags.Where(t =&gt; newTags.Contains(t.Title)).ToList();
              var notSavedTags = tags.Where(t =&gt; savedTags.All(st =&gt; st.Title != t.Title)).ToList();
              var insertedTags = _db.Tags.AddRange(notSavedTags).ToList();
              insertedTags.AddRange(savedTags);
              _db.SaveChanges();
  
  
              var updatedPost = post;
              updatedPost.Title = postText;
              updatedPost.Tags = insertedTags;
              _db.Posts.Attach(updatedPost);
              var entry = _db.Entry(updatedPost);
              entry.Property(e =&gt; e.Title).IsModified = true;
              entry.Property(e =&gt; e.Tags).IsModified = true;
  
  
              _db.SaveChanges();
  </code></pre>
  
  <p>How to update tags? </p>