0
誰もがネットコアに変換するために、このコードは私を助けることができます:等価System.Data.Linq.Binary
private static string GetValueFromModelValue(object formValue)
{
//Test to determine if its binary data. If it is, we need to convert it to a base64 string.
Binary binaryValue = formValue as Binary;
if (binaryValue != null)
{
formValue = binaryValue.ToArray();
}
//If the above conversion to an array worked, then the following will cast as a byte array and convert.
byte[] byteArrayValue = formValue as byte[];
if (byteArrayValue != null)
{
formValue = Convert.ToBase64String(byteArrayValue);
}
return formValue.ToString();
}