public async Task <IActionResult> Index() { var values = await _valueService.GetAsync(); return(View(values)); //ViewData["Title"] = "Домашняя страница"; //return View(); }
public async Task <IActionResult> Index() { //throw new Exception("No pasaran!"); _logger?.LogInformation("index action requested"); _logger?.LogTrace("trace! winter is coming!"); _logger?.LogInformation("info! winter is coming!"); _logger?.LogWarning("warning! winter is coming!"); _logger?.LogDebug("debug! winter is coming!"); _logger?.LogError("error! winter is coming!"); _logger?.LogCritical("critical! winter is coming!"); var values = await _valueService.GetAsync(); return(View(values)); }
public async Task <IActionResult> Index(/*int? categoryId, int? brandId*/) { _logger?.LogInformation(message: "Index action requsted"); _logger?.LogCritical(message: "Critical! All cats are beautiful!"); _logger?.LogError(message: "Error! All cats are beautiful!"); _logger?.LogWarning(message: "Warning! All cats are beautiful!"); _logger?.LogDebug(message: "Debug! All cats are beautiful!"); var values = await _valueService.GetAsync(); #region Products filtred and show //var products = _productService.GetProducts(new ProductFilter //{ // BrandId = brandId, // CategoryId = categoryId //}); //var model = new CatalogViewModel() //{ // BrandId = brandId, // CategoryId = categoryId, // Products = products.Select(p => new ProductViewModel() // { // Id = p.Id, // ImageUrl = p.ImageUrl, // Name = p.Name, // Order = p.Order, // Price = p.Price, // BrandName = p.Brand?.Name ?? string.Empty // }).OrderBy(p => p.Order).ToList() //}; #endregion return(View(values)); }
public async Task <ActionResult <PagedResultDto <ResponseValueDto> > > GetValues([FromQuery] RequestSearchTermValueDto searchRequest) { var valueResult = await _valueService.GetAsync(searchRequest); return(Ok(valueResult)); }
public async Task <IActionResult> Index() { var values = await _service.GetAsync(); return(View(values)); }