public async Task <IActionResult> EditForum(EditForumModel model) { var forum = _forumService.GetById(model.Id); forum.Title = model.Title; forum.Description = model.Description; forum.Id = model.Id; if (model.ImageUrl != null) { forum.ImageUrl = model.ImageUrl; } await _forumService.Edit(forum); return(RedirectToAction("Index", "Forum")); }