ASP.NET Core 3.1 VMMV, C# and SQl Server
There are PDF (BLOBs) documents (20KB to 800MB) in a SQl Server varbinary(max) field that I read using Dapper ORM into a View Model object: The BLOB is successfully read into a byte array called _DocumentBLOB which is accessible from the Razor page.
So, the PDF is binary data in a byte array on the Razor page - How do I render the PDF onto the page?
View Model Object:
public class BLOBModel
{
public int _Document_DataID; // retrieval argument
public byte[] _DocumentBLOB; // PDF BLOB
...
}
table:
CREATE TABLE [dbo].[DocBLOB](
[Document_DataID] [int] NOT NULL,
[DocumentBLOB] [varbinary](max) NULL
)