public async Task <IActionResult> Create()
        {
            var devicetypes = await _deviceTypeService.GetAllAsync();

            var vm    = _deviceTypeViewModelMapper.MapFrom(devicetypes);
            var newvm = new CreateDeviceViewModel
            {
                DeviceTypes = vm
            };

            return(View(newvm));
        }
示例#2
0
 public async Task <IEnumerable <DeviceTypeDto> > ProcessAsync()
 {
     return(await _deviceTypeService.GetAllAsync());
 }
示例#3
0
 /// <summary>
 /// 初始化设备类型
 /// </summary>
 /// <returns></returns>
 public async Task AddDeviceType()
 {
     await _deviceTypeService.GetAllAsync();
 }