XMLType in Entity Framework 6
Posted: Thu 21 Dec 2017 09:39
Hi,
I have in the database a column of type XMLType.
In a code first scenario, how should I map the XMLType in my model?
I tried mapping it to string.
Reading the entity: no problems
Writing the entity:
- No problem if I put a MaxLength of 4000, but then I can't write an XML > 4000
- If I do not put a MexLength on it, I get the following error:
ORA-00932: inconsistent datatypes: expected - got CLOB
How should I do this with EF?
I have in the database a column of type XMLType.
In a code first scenario, how should I map the XMLType in my model?
I tried mapping it to string.
Reading the entity: no problems
Writing the entity:
- No problem if I put a MaxLength of 4000, but then I can't write an XML > 4000
- If I do not put a MexLength on it, I get the following error:
ORA-00932: inconsistent datatypes: expected - got CLOB
How should I do this with EF?