コード例 #1
0
        public async Task <ActionResult> Index()
        {
            List <LoggingDeviceInfo> devices = await devicesService.GetLoggingDevices();

            List <FirmwareUpgradeInfo> upgrades = await upgradesService.GetFirmwareUpgrades();

            LoggingDeviceListViewModel vm = new LoggingDeviceListViewModel
            {
                FirmwareUpgrades = upgrades,
                LoggingDevices   = Mapper.Map <List <LoggingDeviceInfo>, List <LoggingDeviceViewModel> >(devices)
            };

            return(View(vm));
        }
コード例 #2
0
        public async Task <ActionResult> Index()
        {
            List <FirmwareUpgradeInfo> upgrades = await upgradesService.GetFirmwareUpgrades();

            return(View(Mapper.Map <List <FirmwareUpgradeInfo>, List <FirmwareUpgradeViewModel> >(upgrades)));
        }