コード例 #1
0
ファイル: ProjectsViewModel.cs プロジェクト: slaq777/lmsystem
 public void SaveComment(string comment)
 {
     var currentUserId = WebSecurity.CurrentUserId;
     var newComment = new ProjectComment
     {
         CommentText = comment,
         ProjectId = ProjectId,
         UserId = currentUserId,
         CommentingDate = DateTime.Now
     };
     ProjectManagementService.SaveComment(newComment);
 }
コード例 #2
0
 public void SaveComment(ProjectComment comment)
 {
     using (var repositoriesContainer = new LmPlatformRepositoriesContainer())
     {
         repositoriesContainer.ProjectCommentsRepository.Save(comment);
         repositoriesContainer.ApplyChanges();
     }
 }