Пример #1
0
 public static IEnumerable <IStock> Search(this IStockRepository repository, ApiRoute.StockSearch.StockSearchParams args)
 {
     return
         (args == null
         ? repository.GetAll()
         : repository.Search(args.ToDomainSearchArgs()));
 }
Пример #2
0
        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));
        }