public Guitar SearchGuitar(Guitar searchGuitar) { foreach (var guitar in _guitars) { if (!StringsMatch(searchGuitar.GetBuilder(), guitar.GetBuilder())) { continue; } if (!StringsMatch(searchGuitar.GetModel(), guitar.GetModel())) { continue; } if (!StringsMatch(searchGuitar.GetGuitarType(), guitar.GetGuitarType())) { continue; } if (!StringsMatch(searchGuitar.GetBackWood(), guitar.GetBackWood())) { continue; } if (!StringsMatch(searchGuitar.GetTopWood(), searchGuitar.GetTopWood())) { continue; } } return(null); }
public List <Guitar> AddGuitar(string serialNumber, double price, string builder, string model, string type, string backWood, string topWood) { Guitar guitar = new Guitar(serialNumber, price, builder, model, type, backWood, topWood); _guitars.Add(guitar); return(_guitars); }