public ProductInformationViewModel(IServerManager manager, Product selectedProduct, IEnumerable<Product> products) { this.manager = manager; this.products = products; this.MainProductViewModel = new ProductViewModel(selectedProduct.DeepClone()); this.Save = new RelayCommand(this.HandleSave, this.CanSave); this.Cancel = new RelayCommand(this.HandleCancel); this.ProductInAllServers = new Dictionary<ServerInformation, ProductViewModel>(); foreach (var pair in this.manager.Cache.ProductsPerServer) { var product = pair.Value.FirstOrDefault(x => x.Name == selectedProduct.Name); var productViewModel = new ProductViewModel(product ?? new Product()); this.ProductInAllServers.Add(pair.Key, productViewModel); } }