-
Notifications
You must be signed in to change notification settings - Fork 171
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
使用mongodb的ef驱动 报错 #269
Comments
MongoDB.EntityFrameworkCore 8.0.1 |
为什么不用依赖注入而用静态属性 |
我是按照官网教程编写的,不知道是不是支持nosql? |
直接编写的Console测试代码 |
@xuejmnet 改用注入之后有了新的报错
} error: |
@x0gundam1133 这个错误应该是他不是关系型数据库所以可能没办法用分库分表 |
public static void ConfigureServices(IServiceCollection services)
} |
@x0gundam1133 sharding-core底层会将connection转成relationconnection关系型链接包括模型之类的操作所以可能没办法支持 |
好吧,要是能支持nosql就好了 |
按照官方示例编写的简单代码
internal class TestDbContext : AbstractShardingDbContext, IShardingTableDbContext
{
public IRouteTail RouteTail { get; set; }
}
第一行调用ShardingProvider.ShardingRuntimeContext.UseAutoTryCompensateTable(); 就报错了:
The model must be finalized and its runtime dependencies must be initialized before 'GetRelationalModel' can be used. Ensure that either 'OnModelCreating' has completed or, if using a stand-alone 'ModelBuilder', that 'IModelRuntimeInitializer.Initialize(model.FinalizeModel())' was called.
The text was updated successfully, but these errors were encountered: