I understand this is a beta (just checked the new version of EF 4.3 and it does the same thing) release and some functionality may be missing, but i haven`t seen anything to explain why...
[Column(TypeName = "xml")]
public string SomeProperty { get; set; }
... no longer creates a column of type xml when using EF 4.3 (column is created as nvarchar(max)) , I have tried EF 4.2 and that creates the column just fine. Just for reference i am connecting to sql server 2008r2 and have also tried the express edition. I am using XML to store data of constantly changing data schemas, and altho i understand that this will be passed back as a string I need the ability to create stored procedures against the xml data within sql.I have also tried using the .HasDataType() method with no luck.
On a side note I am however able to create varchar
and I believe nchar
types, but not ntext
or text
types using the same method.
So really my questions are:
Thanks for the report. We have identified this as an unintended breaking change in EF 4.3. The reason for the change is that we switched DDL generation to use the new engine in Code First Migrations for SQL Server databases and Code First Migrations doesn't currently honor all possible database data types. We plan to include a fix for this issue in EF 4.3.1 in a few weeks from now.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With