public async Task <Post> AddPost(int categoryId, [FromBody] Post post) { post.CategoryId = categoryId; await _postRepository.AddAsyn(post); await _postRepository.SaveAsync(); return(post); }