Example #1
0
        public void ValueRepository_Test()
        {
            var actualResult   = _valueRepository.GetValues();
            var expectedResult = new string[] { "valueFromRepository1", "valueFromRepository2" };

            Assert.AreEqual(expectedResult, actualResult);
        }
        public async Task <IActionResult> GetValues([FromQuery] ValueParams valueParams)
        {
            var values = await repository.GetValues(valueParams);

            var valuesToMapping = mapper.Map <IEnumerable <ValueForListDto> >(values);

            Response.AddPagination(values.CurrentPage, values.PageSize, values.TotalCount, values.TotalPages);
            //  string price = "15 000";
            //  price = price.Replace(" ", "");
            //  int priceInt = Convert.ToInt16(price.Replace(" ", ""));
            //  Console.WriteLine("-----------------------------------------------------Cena" + priceInt);


            return(Ok(valuesToMapping));
        }
Example #3
0
        public async Task <IActionResult> GetValues()
        {
            var values = await _valueRepository.GetValues();

            return(Ok(values));
        }
Example #4
0
 public IEnumerable <string> GetValues()
 {
     return(valueRepository.GetValues());
 }
 public IQueryable <Value> GetValues()
 {
     return(repo.GetValues());
 }
Example #6
0
        public async Task <IActionResult> Get()
        {
            var values = await _valueRepository.GetValues();

            return(Ok(_mapper.Map <List <ValueResource> >(values)));
        }
        public async Task <IEnumerable <string> > Handle(GetValuesRequest request, CancellationToken cancellationToken)
        {
            await Task.Delay(5, cancellationToken);

            return(_repository.GetValues());
        }
Example #8
0
 public ActionResult <IEnumerable <string> > Get()
 => _valueRepository.GetValues();
Example #9
0
        public async Task <IEnumerable <Value> > GetValues()
        {
            IEnumerable <Value> values = await _valuesRepo.GetValues();

            return(values);
        }