It is pretty common, especially in applications with an ORM, to have a two way mapping between classes. Like this:
public class Product
{
private List
This is not the correct way to model this problem.
A Product
ought to have a Price
, a Price
ought not to have a Product
:
public class Product
{
public Price CurrentPrice {get; private set; }
public IList HistoricPrices { get; private set;}
}
public class Price { }
In your particular setup, what does it mean to for a Price
to have a Product
? In the class I created above you would be able to handle all pricing within the Product
class itself.