public IActionResult Create() { var model = new CreateOrUpdateDeviceModel { Device = new DeviceDto() }; return(PartialView(model)); }
public async Task <IActionResult> UpdateAsync(CreateOrUpdateDeviceModel model) { if (ModelState.IsValid) { await _devices.UpdateDeviceAsync(model.Device); } return(PartialView("Update", model)); }
public async Task <IActionResult> UpdateAsync(int id) { var device = await _devices.GetDeviceByIdAsync(id); var model = new CreateOrUpdateDeviceModel { Device = device }; return(PartialView(model)); }