public List <Guitar> SearchGuitars(Guitar guitar) { List <Guitar> newList = new List <Guitar>(); foreach (var item in Guitars) { if (item.GuitarSpec.TopWood == guitar.GuitarSpec.TopWood && item.GuitarSpec.Model == guitar.GuitarSpec.Model && item.GuitarSpec.BackWood == guitar.GuitarSpec.BackWood && item.GuitarSpec.Builder == guitar.GuitarSpec.Builder) { newList.Add(item); } } return(newList); }
public void AddGuitar(Guitar guitar) { Guitars.Add(guitar); }