I am using the first Entity Framework code and four of my columns are a base64 image view and have a type string. I initially allowed EF to save them as standard nvarchar (max). Today I found out that nvarchar (max) is twice the size of the data in fact, when dealing with images, this difference is huge.
I tried using varchar, but it displays a maximum length of 8000, which is too small for a base64 image. I also tried the text, but this does not seem to be a valid type.
Any suggestions on what could be a good type that will support data length while maintaining a reasonable size?
source
share