This is a migration project, I have a table in SQL Server containing image data stored as VARBINARY(MAX) data type, able to store image as byte[] to database using EF Core 8. While retrieving data from database using EF Core, I get an exception.
Database table schema:
DbSet model
Rows in the database, inserted using same EF Core DbContext:
But while retrieving collection of rows using the code shown here, it is throwing an exception
Data is Null. This method or property cannot be called on Null values
Code:
var dbContext = new MigrationDBContext();
var list = dbContext.ImageDetails.ToList();
I am trying storing image data with EF Core for the very first time, any suggestions?



File_Blob_PathandFile_Local_Pathshould be of typestring?. And do not post code as images.