How to make streams from BLOBs available in plain old C# objects when using SqlDataReader?

前端 未结 3 1463
小鲜肉
小鲜肉 2021-02-04 13:48

This is the scenario:

  • We store files, e.g. relatively large documents (10-300MB), in blobs in our MSSQL database.
  • We have a very small domain model so we
3条回答
  •  攒了一身酷
    2021-02-04 14:16

    Note that .net 4.5 now does this OOB - SqlDataReader.GetStream()

    http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqldatareader.getstream(v=vs.110).aspx

提交回复
热议问题