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)); }
public async Task <IActionResult> GetValues() { var values = await _valueRepository.GetValues(); return(Ok(values)); }
public IEnumerable <string> GetValues() { return(valueRepository.GetValues()); }
public IQueryable <Value> GetValues() { return(repo.GetValues()); }
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()); }
public ActionResult <IEnumerable <string> > Get() => _valueRepository.GetValues();
public async Task <IEnumerable <Value> > GetValues() { IEnumerable <Value> values = await _valuesRepo.GetValues(); return(values); }