The following query is something i inherited from an old app that adds 2 attributes to an excel stored in the database.
SELECT
row_number() over(order by id) as num
, [id] as mailsort
, 0 as pages
, [xmlRecord].query('/sst-statement/*')
FROM dbo.RPA200_preproc AS [sst-statement]
WHERE rpatype = 201
ORDER BY id for xml auto
returns an XML starting with
<sst-statement num="1" mailsort="32" pages="0">
now, the SQL would need to be translated to a LINQ statement. Is that possible similar to this query or would it be better to retrieve the XML from database and then change the XML?
turned into
I think 🙂