The Da Vinci Code is fiction. Hereās what Biblical scholar (and skeptic) Bart Ehrman says about the book, in his blog article, āThe Son of God, the Council of Nicea, and the Da Vinci Codeā (February 16, 2016):
Iām afraid many people today (most?) get their knowledge of Arius, the Arian Controversy, and the Council of Nicea from that inestimable authority, Dan Brown, who wrote about it at length in that great work of historical realism, The Da Vinci Code. I tell my students at Chapel Hill that if they want to learn about the history of the Middle Ages, the way to do that is not by watching āMonty Python and the Holy Grail.ā And if they want to learn about the history of early Christianity, the way to do that is not by reading The Da Vinci Code.
The Da Vinci Code is wrong about just about everything it says about the Arian Controversy, the emperor Constantine, and the Council of Nicea. Thatās why I wrote my earlier book Truth and Fiction in the Da Vinci Code. There were tons of books written in response to Dan Brownās novel, but virtually all of them were by highly religious (and angry) people ā either Roman Catholic or conservative evangelicals ā who had deep-seated theological reasons for really disliking the book. I myself did not dislike it so much: I thought for a page-turner at the beach, it was rather fun. My sense is that people who donāt like it (i.e., most of my friends) are simply expecting way too much of it as a work of fiction. Itās not a great work of fiction. But itās a good blow-off novel if you donāt want a lot of substance. Still, the problem I had with it was that so much information was wrong, even when getting it right would not have had any effect on the plot or the characters. It was just gratuitously wrong. This included most everything it says about the historical Jesus, Mary Magdalene, the New Testament, and yes, the Arian Controversy and the Council of Nicea.
And hereās what Ehrman has to say on Dan Brownās claims about Mary Magdalene, in a blog article titled, Jesus Kissing Mary Magdalene (Febraury 4, 2014):
Some of the historical claims about the non-canonical Gospels in the Da Vinci Code have struck scholars as outrageous, or at least outrageously funny. The book claims, for example, that some of these Gospels were discovered among the Dead Sea Scrolls. That of course is completely wrong: the Dead Sea Scrolls do not contain any Gospels, or any Christian writings of any sort. They are Jewish texts, which never mention Jesus or any of his followers. And the novel claims that Jesusā marriage to Mary Magdalene is frequently reported in the Gospels that did not make it into the New Testament. On the contrary, not only is their marriage not reported frequently, it is never reported at all, in any surviving Gospel, canonical or non-canonical.
The Da Vinci Codeās claims about Mary Magdalene are thoroughly debunked in a review by another Biblical scholar, Bruce Fisk.