예제 #1
0
        // 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));
        }
예제 #2
0
 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));
        }
예제 #4
0
 public List <Equipment> GetEquipment()
 {
     return(_equipmentRepository.GetAllEquipment());
 }