public static IEnumerable <IStock> Search(this IStockRepository repository, ApiRoute.StockSearch.StockSearchParams args) { return (args == null ? repository.GetAll() : repository.Search(args.ToDomainSearchArgs())); }
public dynamic Get([FromUri] ApiRoute.StockSearch.StockSearchParams args) { var vm = _stockRepository .Search(args) .Select(CreateStockListingViewModel) .CreateViewModel() .AddLinks(_navLinkService.CreateLink("self", Request.RequestUri.AbsoluteUri)); return(Ok(vm)); }