public override string Build() { if (!ParametersDictionary.ContainsKey(StarthistoryidName)) { throw new Exception(string.Concat("Required ID ", StarthistoryidName, " not set")); } return(base.Build()); }
public void AddModel(ModelSearchDto model) { if (parameters.ContainsKey("brandId") && model.BrandKey != parameters["brandId"]) { throw new ArgumentException( AutoResourceFile.OnlyModelsUnderTheSameBrandCanBeUsedForSearchCriteria); } parameters["modelId"] = "0"; parameters.Add("models[]", model.ModelKeys); }