public JsonResult SearchAuto([FromServices] IReferenceSearchService service, [FromQuery] string prefix) { var references = service.Search(prefix, new RequestParams { Limit = 12 }); return(Json(references)); }
public async Task <JsonResult> Search([FromServices] IReferenceSearchService service, [FromQuery] string prefix) { var results = service.Search(prefix, new RequestParams { Limit = 12 }); return(Json(new { Success = true, Content = await this.RenderViewAsync("Header/_SearchResultsPartial", FormViewModel(results), true) })); }