//search by users public IList <SearchDTO> SearchAllUsers(string searchString, Guid UserId) { IList <SearchDTO> getAllResults = searchDBContext.GetAllUsers(searchString, UserId); if (getAllResults != null) { return(getAllResults); } else { return(null); } }
public IList <SearchDTO> SearchAllUsers(string searchString, Guid UserId) { IList <SearchDTO> getAllResults = searchDBContext.GetAllUsers(searchString, UserId); try { if (getAllResults != null) { return(getAllResults); } else { throw new Exceptions.ResultIsNull("No item Exists matching your search criteria"); } } catch (Exception ex) { return(null); } }