我已经生成了一个 XML,我想用它来查询 SQL Server 数据库。
<?xml version=\"1.0\" encoding=\"utf-16\"?>
<bank>
<account>
<ID>90898908877454</ID>
<FirstName>Jonathan</FirstName>
<LastName>Li</LastName>
</account>
</bank>
C#方法:
public List<BankAccount> bankInf(string content)
{
List<BankAccount> list = new List<BankAccount>();
// I want to take the XML content and use it to get all account transaction of the user (using his `ID`, `FirstName` and `LastName` fields)
return list;// Return a XML of the result
}
我的数据库看起来像
bank
_____
ID ----- 54857485
FirstName ------ Jonathan
LastName --------Li
Balance --------435.54