public async Task <ActionResult> Edit(string pkgId, EditPackageModel model) { var package = await _packageCoordinator.GetPackage(pkgId); if (package == null) { return(RedirectToAction("Index")); } package.PackageInstallCommand = model.InstallCommandLine; await _packageCoordinator.UpdatePackage(package); return(RedirectToAction("Details", new { pkgId })); }
public async Task <ActionResult> Edit(string pkgId) { var package = await _packageCoordinator.GetPackage(pkgId); if (package == null) { return(RedirectToAction("Index")); } var model = new EditPackageModel { PackageName = pkgId, InstallCommandLine = package.PackageInstallCommand, }; return(View(model)); }