0

I have the PersonDetails table in the database whose fields are given below :

ID    AutoGenerated field

PersonName  Int Not null

FailureDetails  XML not null

I have an xml file in my local drive D:\personFailureDetails.xml which needs to be saved in PersonDetails table along with other fields.

I am using entity framework to retieve and insert data to database.

Which is the best way to insert values into “PersonDetails” entity?

Which datatype is available to get the xml file to be stored in entity to be inserted into the “PersonDetails” table?

0

1 Answer 1

2

EntityFramework does not support Xml properties so you will have to create a string property which you will save the xml as a string to when saving changes or load an xml document from after querying. I don't remember from the top of my head if you can insert strings to Xml columns directly - if not you may need to create a stored proc for saving the string as Xml in your db.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.