public async Task <bool> Insert([FromBody] Post post) { post.Date = DateTimeOffset.UtcNow.ToUnixTimeSeconds(); _context.Post.Add(post); await _context.SaveChangesAsync(); return(true); }
public async Task <bool> Insert(Comment comment) { _context.Comment.Add(comment); await _context.SaveChangesAsync(); return(true); }