arch / UnitOfWork

A plugin for Microsoft.EntityFrameworkCore to support repository, unit of work patterns, multiple database with distributed transaction supported, and MySQL multiple databases/tables sharding supported.
MIT License
1.32k stars 343 forks source link

分表操作:第一次调用仓储对象的ChangeTable指定新表时就报这样的错,但是第二次就不会报错,每次都是在运行项目后第一次调用时报错 System.NullReferenceException:“Object reference not set to an instance of an object #142

Open GitHubForCJJ opened 4 years ago

issue-label-bot[bot] commented 4 years ago

Issue-Label Bot is automatically applying the label bug to this issue, with a confidence of 0.67. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

GitHubForCJJ commented 4 years ago

KKF7$~V4RW)HKA7L~QJ2R9U

GitHubForCJJ commented 4 years ago

我用源码调试了也有问题,我不清楚是不是我调用方式有问题

VergilGao commented 3 years ago

你好,能提供一下可以复现这个BUG的最小化demo吗?

xye1989 commented 3 years ago

直接用你的UnitOfWork.Host的ValuesController接口中,执行到ChangeTable方法就会抛出这个null引用异常了。