We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
EntityFrameworkCorePackBase中强行注入DefaultDbContext不合理,如果不使用DefaultDbContext的时候,会造成混乱
EntityFrameworkCorePackBase
DefaultDbContext
移除EntityFrameworkCorePackBase中的上下文注入
public abstract class EntityFrameworkCorePackBase : OsharpPack { public override IServiceCollection AddServices(IServiceCollection services) { // services.AddOsharpDbContext<DefaultDbContext>(); } }
改到MigrationPackBase<TDbContext>基类中执行上下文类型的注入
MigrationPackBase<TDbContext>
public abstract class MigrationPackBase<TDbContext> : OsharpPack where TDbContext : DbContext { public override IServiceCollection AddServices(IServiceCollection services) { services.AddOsharpDbContext<TDbContext>(); return services; } }
The text was updated successfully, but these errors were encountered:
feat(efcore): 调整IServiceCollection.AddOsharpDbContext<TDbContext>()的执…
9ff4b41
…行位置 #225
No branches or pull requests
您的功能请求与现有问题有关吗?请描述
EntityFrameworkCorePackBase
中强行注入DefaultDbContext
不合理,如果不使用DefaultDbContext
的时候,会造成混乱描述您想要的需求方案
移除
EntityFrameworkCorePackBase
中的上下文注入改到
MigrationPackBase<TDbContext>
基类中执行上下文类型的注入The text was updated successfully, but these errors were encountered: