public void Add(HandSetFeatures newModel) { HandSetFeatures old; if (!models.TryGetValue(newModel.Model, out old)) { models.Add(newModel.Model, newModel); spaceLess.Add(Miscellany.RemoveSpaces(newModel.Model), newModel); } else { newModel.CopyTo(old); } }
public string GetSpecificModelBrand(string model) { HandSetFeatures features; if (models.TryGetValue(model, out features)) { return(features.Brand); } //return models[model].Brand; if (spaceLess.TryGetValue(Miscellany.RemoveSpaces(model), out features)) { return(features.Brand); } else { throw new Exception($"Error....I don't have the {model} model in my database"); } }