public IActionResult Edited(RunEditViewModel model) { var manuals = new RunManuals(model.Worldname); manuals.YoutubeLink = model.YoutubeLink; manuals.SpeedrunLink = model.SpeedrunLink; manuals.RuntimeInMs = parseRuntime(model.Runtime); _manualsWriter.Upsert(manuals); return(RedirectToAction("Edit", new { worldname = model.Worldname })); }
public IActionResult Edit(string worldname) { RunManuals manuals = _manualsReader.Get(worldname); if (manuals == null) { manuals = new RunManuals(worldname); } var viewmodel = new RunEditViewModel(manuals); return(View(viewmodel)); }