public string FormAutocompleteResponseByName(string query) { var employees = employeeDataAccessObject.DirectSearch(query, null, null, Roles.All, null); var suggestions = employees.Select(employee => employee.Name).ToList(); var queryModel = new AutocompleteQuery() { query = query, suggestions = suggestions }; return(JsonConvert.SerializeObject(queryModel)); }