Thanks for your comment @drsensor.
Well, I haven't gotten to the part of the tutorial where images are fetched as navigation properties of other entities(that will be the next tutorial).
However, when images are to be loaded, eager loading or lazy loading will work just fine. Remember, I am not storing the image file in the database, only a string representing the file path.
Eventually though, eager loading would be a better approach as it would load every required related data in one query.
- For the temporary storage, well, I am using and disposing the stream immediately the file write is done. So generally, there is no occurrence of server bloating. Also, making use of temporary files creates a problem when so many users are writing against the same temporary files folder. ASP.NET's core exception limit for concurrent usage of
tempFiles is 65533(or thereabout). This becomes a problem when you have a large user base all performing their own actions against this same folder.
Wow, there is concurrent usage limit, thats new to me :o . It's been a while since I fiddle with ASP.NET (and now Core). Thanks for the info, I learn a lot. Looking forward for your next tutorials :)