I'm working on a project using EF6 with C #, in one of my classes I have to save a file, example below:
public partial class Arquivo
{
[Key]
public int ArquivoID { get; set; }
public string Nome { get; set; }
public byte[] ArquivoFisico { get; set; }
public string TipoArquivo { get; set; }
}
My problem is in the arquivofisico
property when I query data from other classes that are bound to this one I would not like to load the arquivofisico
property, as I can have 5, 10 MB files, my server's memory goes popping up if I have too many classes ... I want to access this property only when I use a generic handler to download.
Do you have any tips for doing this or do I have to use lazy loading anyway?
Thanks for the help.