Exemple #1
0
        public IActionResult PvPanels()
        {
            var results = _repository.GetAll();


            return(View(results.ToList()));
        }
Exemple #2
0
 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"));
     }
 }
Exemple #3
0
 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()));
     }
 }