public async Task <IActionResult> Create(TypeViewModel model) { if (ModelState.IsValid) { int id = await _contentsService.AddContentTypeAsync(model.Name); return(RedirectToAction("TypeDetails", new { id = id })); } return(View(model)); }
public async Task <IActionResult> Create(TypeViewModel model) { if (ModelState.IsValid) { int id = await _contentsService.AddContentTypeAsync(model.Name); return(RedirectToAction("TypeDetails", new { id = id })); } return(View(model)); }