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

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

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