vaviqeboge
New Member
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 would still like the column type to be XML, though. Here's my class:\[code\]class Content{ public int ContentId { get; set; } [Column(Type="xml")] public string XmlString { get; set; } [NotMapped] public XElement Xml { get { ... } set { ... } } }\[/code\]Problem is, that Code First Migrations completely ignores the Column attribute and creates the field as an \[code\]nvarchar(max)\[/code\] . I tried using \[code\][DataType("xml")]\[/code\], but that, too, didn't work.Is this a migration bug?