I have a "User" entity that has a "ProfilePicture" byte-array property, persisted in a Filestream field on SQL Server.
I would like to make this web application work in an Azure AppService, and It would be great if all binary contents (pictures) are saved inside an Azure blob storage container.
My application works great On-Premises, and I would like to keep everything as is, changing only the binary data persistence behavior.
How can achieve this?
My idea is to create a custom ProxyFactory class that injects Blob storage persistence logic inside entity binary properties' getters and setters (AOP style), and invoke that logic using an event listener. Does this make sense?
Anyway:
1. How can I create a custom ProxyFactory class, and how can I specify it in my NH configuration?
2. Is there a way to create custom proxies using NHibernate, or I have to rely on external libraries (i.e. Castle)?
Thanks a lot,
--
Alberto