I'm having some files saved into a MSSQL database using EF core with a structure like
public class UploadedFile
{
public int Id { get; set; }
public string Source { get; set; }
public byte[] Content { get; set; }
I want to be able to load the list of "UploadedFiles" from database without actually reading the Content column from the database. So I can't really use
await _context.UploadedFiles.ToListAsync();
I believe I can use something like bellow with a stored procedure.
_context.Set<UploadedFiles>().FromSql("dbo.spGetUploadedFiles")
But, is there any other way that would not involve using a stored procedure? I can't un-map the column in the model as I need it for insert/read individual items. Thank you.