+
+
+
+
+
+ | id |
+ 标题 |
+ 作者 |
+ 标签 |
+ 操作 |
+
+
+ | {{ blog.id }} |
+ {{ blog.title }} |
+ {{ blog.author }} |
+ {{ blog.tag }} |
+
+
+
+ |
+
+
+
+ 标题:
+ 作者:
+ 标签:
+
+
+
+
\ No newline at end of file
diff --git "a/\345\224\220\345\255\235\345\235\232/pass/BlogApi.http" "b/\345\224\220\345\255\235\345\235\232/pass/BlogApi.http"
new file mode 100644
index 0000000..9db20a7
--- /dev/null
+++ "b/\345\224\220\345\255\235\345\235\232/pass/BlogApi.http"
@@ -0,0 +1,39 @@
+@BlogApi_HostAddress = http://localhost:3000
+
+###根据id获取书籍信息l
+GET {{BlogApi_HostAddress}}/api/blog/10
+
+
+###获取全部书籍信息
+GET {{BlogApi_HostAddress}}/api/blog
+
+
+###添加书籍
+POST {{BlogApi_HostAddress}}/api/blog
+Content-Type: application/json
+
+{
+ "title": "西游",
+ "author": "吴承恩",
+ "tag":"小说"
+}
+
+
+
+###更新书籍
+PUT {{BlogApi_HostAddress}}/api/blog/13
+Content-Type: application/json
+
+{
+ "id": 13,
+ "title": "红楼",
+ "author": "吴承恩",
+ "tag":"小说"
+}
+
+
+###删除书籍
+DELETE {{BlogApi_HostAddress}}/api/blog/9
+
+
+###
diff --git "a/\345\224\220\345\255\235\345\235\232/pass/Controllers/BlogController.cs" "b/\345\224\220\345\255\235\345\235\232/pass/Controllers/BlogController.cs"
new file mode 100644
index 0000000..a59c30a
--- /dev/null
+++ "b/\345\224\220\345\255\235\345\235\232/pass/Controllers/BlogController.cs"
@@ -0,0 +1,56 @@
+using Microsoft.AspNetCore.Mvc;
+using BlogApi.Interfaces;
+using BlogApi.Models;
+[Route("api/[controller]")]
+[ApiController]
+public class BlogController:ControllerBase{
+ private readonly IBlogsRepository