// GET: /<controller>/ public IActionResult Index() { var equipment = _equipmentRepository.GetAllEquipment().OrderBy(e => e.Name); var homeViewModel = new HomeViewModel() { equipment = equipment.ToList(), Title = "Welcome to the online medical store" }; return(View(homeViewModel)); }
public IActionResult Index() { try { return(View("Index", _equipmentRepository.GetAllEquipment().ToList())); } catch (Exception e) { Log.Error(e); return(RedirectToAction("Error")); } }
//view index that returns all the equipment public ViewResult Index() { var equipment = _equipmentRepository.GetAllEquipment().OrderBy(e => e.Name); return(View(equipment)); }
public List <Equipment> GetEquipment() { return(_equipmentRepository.GetAllEquipment()); }