Thanks for the quick reply.
I just finished extending PictureService to adapt our business logic.
My first implementation inlcudes WebPicture a class derived from Picture and MyPictureService which extends PictureService.
Then override
1) GetPicturesByProductId so that it returns type WebPicture
2) GetPictureUrl which constructs urls based on WebPicture.
The problem with this approach is that it is only useful for products (even though they are my sole concern).
I would suggest an all purpose approach that includes creating 3 derived types of Picture
1) FilePicture -> a picture stored in local filesystem
2) DbPicture -> a picture stored in database
3) WebPicture -> a picture accessed via a remote url
Then have a common method
String GetUrl(...)
and each type will provide an imlementation.
1) local file
2) controller action
3) remote url
This would require a new table in the database for each picture type and use Picture as a mapping to each one.
Even though, this approach does not comply with the POCO pattern nopCommerce seems to use for domain objects, I believe it is far more versatile.
Any thoughts on that ?
My current solution gets the work done, so I will proceed with the second proposal only if there is a possibility it will accepted to the repository.
Ps If I am posting in the wrong place, please direct me.
Thanks in advance,
Kostas Alexopoulos