Ejemplo n.º 1
0
 public void Initialize(IModuleRegistrar registrar)
 {
     registrar.RegisterType <IBookRepository, BookRepository>();
     registrar.RegisterType <IUserDemandRepository, UserDemandRepository>();
     registrar.RegisterType <IUnitOfWork, UnitOfWork>();
     registrar.RegisterType <IUserRepository, UserRepository>();
     registrar.RegisterType <IRoleRepository, RoleRepository>();
     registrar.RegisterType <IRefreshTokenRepository, RefreshTokenRepository>();
     registrar.RegisterType(typeof(IBaseRepository <>), typeof(BaseRepository <>));
     registrar.RegisterType <IMongoClient, MongoClient>(ConfigurationManager.ConnectionStrings["MongoDbConnection"].ConnectionString);
     registrar.RegisterInstanceSingleton(typeof(IMongoDatabase), DataSeeder.GetDataBase());
 }
Ejemplo n.º 2
0
 public void Initialize(IModuleRegistrar registrar)
 {
     registrar.RegisterType <IEmailQueueRepository, EmailQueueRepository>();
     registrar.RegisterType <IPdfQueueRepository, PdfQueueRepository>();
     registrar.RegisterType <IRequestQueueRepository, RequestQueueRepository>();
     registrar.RegisterType <IUnitOfWork, UnitOfWork>();
     registrar.RegisterType <IUserRepository, UserRepository>();
     registrar.RegisterType <IRoleRepository, RoleRepository>();
     registrar.RegisterType <IExternalLoginRepository, ExternalLoginRepository>();
     registrar.RegisterType <IRefreshTokenRepository, RefreshTokenRepository>();
     registrar.RegisterType <IClientRepository, ClientRepository>();
     registrar.RegisterType(typeof(IBaseRepository <>), typeof(BaseRepository <>));
     registrar.RegisterType <IMongoClient, MongoClient>(ConfigurationManager.ConnectionStrings["MongoDbConnection"].ConnectionString);
     registrar.RegisterInstanceSingleton(typeof(IMongoDatabase), DataSeeder.GetDataBase());
 }