public void Save(CommentingUserAccountModel model) { var currentUser = CurrentRequestData.CurrentUser; CommentsInfo commentsInfo; if (currentUser.Get <CommentsInfo>() != null) { commentsInfo = currentUser.Get <CommentsInfo>(); } else { commentsInfo = new CommentsInfo { User = currentUser }; _userProfileDataService.Add(commentsInfo); } _session.Transact(session => { commentsInfo.Username = model.Username; session.SaveOrUpdate(commentsInfo); }); }
public RedirectToRouteResult Add(AuthorInfo info) { _userProfileDataService.Add(info); return(RedirectToAction("Edit", "User", new { id = info.User.Id })); }