public async Task <IActionResult> Create(ContentAndTranslationsEditViewModel content) { if (ModelState.IsValid) { await _contentEditorRepository.CreateAsync(content.GetContentEditData()); return(RedirectToAction(nameof(Index))); } return(View(content)); }
public async Task <IActionResult> Edit(ContentAndTranslationsEditViewModel content) { if (ModelState.IsValid) { await _contentEditorRepository.UpdateAsync(content.GetContentEditData()); return(RedirectToAction(nameof(Edit), new { id = content.Id })); } return(View(content)); }