public List <Contact> FindContacts(string filter, ContactSearchType searchType) { var what = ""; switch (searchType) { case ContactSearchType.Institution: what = "i"; break; case ContactSearchType.Surname: what = "n"; break; default: break; } var where = string.Format(" like '{0}%'", filter); var mapper = GetContactMapper(); return(StoredProcToList("spContactList", mapper, _P("vchrSearchWhere", what), _P("vchrWhereClause", where))); }
public List<Contact> FindContacts(string filter, ContactSearchType searchType) { var what = ""; switch (searchType) { case ContactSearchType.Institution: what = "i"; break; case ContactSearchType.Surname: what = "n"; break; default: break; } var where = string.Format(" like '{0}%'", filter); var mapper = GetContactMapper(); return StoredProcToList("spContactList", mapper, _P("vchrSearchWhere", what), _P("vchrWhereClause", where)); }