I'm creating a PCL Xamarin.Forms project and am using SQLite.Net-PCL. My model has an abstract base type, ProductBase with a protected constructor, and two subtypes, ProductA and ProductB, both of which has a parameterless public constructor.
I would like to implement a database method
public List<BaseProduct> GetProducts() which would return both ProductA and ProductB types, but obviously this won't work because ProductBase doesn't expose a parameterless constructor, and I'm not sure that SQLite would perform the implicit conversions.
What is the recommended way for implementing something like this?
Thanks in advance,