SQL Server 内に Biginit 型の assetid という名前のフィールドがあるので、エンティティ フレームワーク内でこのフィールドをマップし、文字列を biginit に変換する方法を教えてください。biginit は、次のような XML 文字列値として受信されます。
<operation>
<operationstatus>Success</operationstatus>
<resourcename>serverrr090909</resourcename>
<assetid>2701</assetid>
<message>Rack serverrr090909 added successfully</message>
</operation>
だから私は次のようなものを書こうとしています:-
Var assetid = message = doc.SelectSingleNode("/operation/message").InnerText;
// so how I can convert the string into biginit
アップデート
私は次のように書きました:-
public void InsertOrUpdateRack(Rack rack,string username,long assetid)
{
//code goes here
IT360ID = assetid,
}
IT360ID = assetid
しかし、型「long」を「int」に暗黙的に変換できませんか? で次のエラーが発生しました。明示的な変換が存在します (キャストがありませんか?)。どうすればintを割り当てることができますか?長い値をフィールドしますか?