public async Task <int> UpdateThemeComment(UpdateThemeCommentViewModel input) { var updateThemeComment = themeCommentDbSet.All().SingleOrDefault(t => t.Id == input.Id); updateThemeComment.UserOpinion = input.UserOpinion; await themeCommentDbSet.SaveChangesAsync(); return((int)updateThemeComment.ThemeId); }
public async Task <IActionResult> UpdateThemeComment(UpdateThemeCommentViewModel input) { if (!this.ModelState.IsValid) { return(View(input)); } int themeId = await themeCommentService.UpdateThemeComment(input); return(this.RedirectToAction("PreviewTheme", "Themes", new { Id = themeId })); }