public IActionResult PvPanels() { var results = _repository.GetAll(); return(View(results.ToList())); }
public ActionResult <IEnumerable <PvPanels> > Get() { try { return(Ok(_repository.GetAll())); } catch (Exception ex) { _logger.LogError($"Failed to get panels: {ex}"); return(BadRequest("Failed to get panels")); } }
public IActionResult Shop(string sortorder) { if (sortorder != null) { var results = _repository.GetByType(sortorder); return(View(results.ToList())); } else { var results = _repository.GetAll(); return(View(results.ToList())); } }