public async Task Put(ICreateComment model) { await Put(new Comment { Author = model.Author, Timestamp = DateTime.Now, Body = model.Body, Entry = model.Entry }); }
public CommentService( ICreateComment createComment, IPostRepository postRepository, IUserRepository userRepository, IRemoveComment removeComment, ICommentRepository commentRepository, IUnityOfWork unityOfWork) { this.createComment = createComment; this.userRepository = userRepository; this.postRepository = postRepository; this.removeComment = removeComment; this.commentRepository = commentRepository; this.unityOfWork = unityOfWork; }