I\'m trying to create an XML column in Code First. I\'m well aware Entity Framework doesn\'t fully support XML columns, and that it reads them as a string. That\'s fine. I w
Have you tried:
public String XmlContent { get; set; }
public XElement XmlValueWrapper
{
get { return XElement.Parse(XmlContent); }
set { XmlContent = value.ToString(); }
}
public partial class XmlEntityMap : EntityTypeConfiguration
{
public XmlEntityMap()
{
// ...
this.Property(c => c.XmlContent).HasColumnType("xml");
this.Ignore(c => c.XmlValueWrapper);
}
}