The Da Vince Code was fiction. It was based in part on a non-fiction book Sacred Blood Holy Grail that was published in 1980.
It posited the theory that Mary Magdalen and Child was spirited out of Palestine to France and this started the French royal line aided later by the Templars.
Whether you accept the theory and facts of the original non-fiction work is another story.
Only because conspiracy theories are classified as nonfiction. Most like that one, stretches legends so far they should be labeled fiction.