public Comment SaveComment(Comment comment, string userId) { var commentDTO = new DTO.CommentDTO() { CommentId = comment.CommentId, Body = comment.Body, MediaId = comment.MediaId, }; var returnedComment = this._dataService.SaveComment(commentDTO, userId); var user = _userService.GetAspNetUser(userId); if (user != null) { var roleName = user.RoleName; if (roleName == "client") { // send email to admin string userName = user.FirstName + ' ' + user.LastName; SendCommentEmailToAdmin(commentDTO, userName); } //else if (roleName == "admin") //{ // //send email to owner of project // SendCommentEmailToClient(commentDTO, user); //} } return(MapEFToModel(returnedComment)); }
public System.Threading.Tasks.Task InsertCommentOnActorIdAsync(DTO.CommentDTO comment, int ActorId) { return(base.Channel.InsertCommentOnActorIdAsync(comment, ActorId)); }
public void InsertCommentOnActorId(DTO.CommentDTO comment, int ActorId) { base.Channel.InsertCommentOnActorId(comment, ActorId); }
public System.Threading.Tasks.Task <bool> InsertCommentOnActorIdAsync(int actorId, DTO.CommentDTO commentDTO) { return(base.Channel.InsertCommentOnActorIdAsync(actorId, commentDTO)); }
public bool InsertCommentOnActorId(int actorId, DTO.CommentDTO commentDTO) { return(base.Channel.InsertCommentOnActorId(actorId, commentDTO)); }
public void InsertCommentOnActorId(int actorId, DTO.CommentDTO commentDTO) { base.Channel.InsertCommentOnActorId(actorId, commentDTO); }