当我想将文件存储在文件流列中时,我总是需要将整个二进制文件读入内存:
using (MemoryStream memoryStream = new MemoryStream()) { sourceStream.CopyTo(memoryStream); binaryStore.Content = memoryStream.ToArray(); //Content = filestream column }