Closed svachha closed 5 years ago
any updates on this one?
@aliBordbar1992 This article offers a good solution to the problem of resolving multiple implementations: http://hamidmosalla.com/2018/06/30/dependency-injection-conditional-resolving-of-multiple-implementation-of-interface/
@aliBordbar1992 @svachha I completed a sample with all the needed code for using multiple DbContexts with URF.Core. Check it out: https://github.com/urfnet/URF.Core.Sample.MultiContext.
Thanks @tonysneed , awesome implementation, closing this issue.
how to use this framework when you have multiple database to target in same project.
Repository takes Dbcontext but only the last DI registration will be used.
Ex. services.AddScoped<DbContext, AContext>(); services.AddScoped<DbContext, BContext>(); services.AddScoped<IUnitOfWork, UnitOfWork>(); service.AddScoped<IRepository,Repository();
only BContext will be resolved
any help appriciated.