public IEnumerable <ContentObject> SearchByField(string field, string term) { IEnumerable <ContentObject> results = null; field = field.ToLowerInvariant(); switch (field) { case "title": case "description": case "developername": case "sponsorname": case "artistname": case "submitteremail": results = _dataStore.GetContentObjectsByField(field, term, _identity); break; case "keywords": results = this.GetContentObjectsByKeyWords(term); break; default: throw new Exception("Referenced field not searchable in MySQL metadata"); } return(results); }