public ProductViewModel(Domain.DomainClasses.Product product) { Id = product.Id; Name = product.Name; Provision = product.Provision; StartPrice = product.GetStartPrice(); SupplierName = product.Supplier.Name; IsSold = product.IsSold; if (product is AntiqueProduct ) { Type = ProductType.Antique; TimeEpoch = ((AntiqueProduct) product).TimeEpoch.ToString(); } if (product is ModernProduct) { Type = ProductType.Modern; DesignerName = ((ModernProduct) product).Designer.Name; } if (product is MassProduct) { Type = ProductType.Mass; DesignerName = ((MassProduct)product).Designer.Name; } }