public SuggestionsDto Get() { var result = new SuggestionsDto(); // check headers for antiforgery tokens if (!ParseAntiForgeryHeader(_antiforgery, result, HttpContext)) { return(result); } // validate input var validationResult = ValidateInputForGet(); if (!validationResult.Passed) { result.ErrorMessage = validationResult.ErrorMessage; return(result); } result.Suggestions = _suggestionService.FindSuggestions(validationResult.CleanedInput); return(result); }