From 179bd6c80197873a15e8984acd83aaa320f05c1b Mon Sep 17 00:00:00 2001 From: xuejiaming <326308290@qq.com> Date: Fri, 17 Dec 2021 08:43:36 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9readme?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0e37cea7..3cae8dac 100644 --- a/README.md +++ b/README.md @@ -192,10 +192,12 @@ dbcontext `AbstractShardingDbContext`和`IShardingTableDbContext`如果你是普 这样所有的配置就完成了你可以愉快地对Order表进行按月分表了 ```csharp - +[Route("api/[controller]")] +public class ValuesController : Controller +{ private readonly MyDbContext _myDbContext; - public XXXXController(MyDbContext myDbContext) + public ValuesController(MyDbContext myDbContext) { _myDbContext = myDbContext; } @@ -206,6 +208,7 @@ dbcontext `AbstractShardingDbContext`和`IShardingTableDbContext`如果你是普 var order = await _myDbContext.Set().FirstOrDefaultAsync(o => o.Id == "2"); return OK(order) } +} ```