Ejemplo n.º 1
0
        /// <summary>
        /// Called by RCommon <see cref="Configure"/> to configure data providers.
        /// </summary>
        /// <param name="containerAdapter">The <see cref="IContainerAdapter"/> instance that allows
        /// registering components.</param>
        public void Configure(IContainerAdapter containerAdapter)
        {
            // EF Core Repository
            containerAdapter.AddGeneric(typeof(IEagerFetchingRepository <>), typeof(EFCoreRepository <>));

            // Registered DbContexts
            foreach (var dbContext in _dbContextTypes)
            {
                containerAdapter.AddTransient(Type.GetType(dbContext), Type.GetType(dbContext));
            }
        }
Ejemplo n.º 2
0
        public void Configure(IContainerAdapter containerAdapter)
        {
            // Repositories
            containerAdapter.AddGeneric(typeof(IEncapsulatedRepository <>), typeof(EncapsulatedRepository <>));
            containerAdapter.AddTransient <IOrderRepository, OrderRepository>();

            // Domain Services
            containerAdapter.AddTransient <ICustomerService, CustomerService>();
            containerAdapter.AddTransient <IOrderService, OrderService>();

            // Application Services
            containerAdapter.AddTransient <IMyAppService, MyAppService>();
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Called by RCommon <see cref="Configure"/> to configure data providers.
 /// </summary>
 /// <param name="containerAdapter">The <see cref="IContainerAdapter"/> instance that allows
 /// registering components.</param>
 public void Configure(IContainerAdapter containerAdapter)
 {
     containerAdapter.AddGeneric(typeof(IEagerFetchingRepository <>), typeof(NHRepository <>));
 }
 public void Configure(IContainerAdapter containerAdapter)
 {
     containerAdapter.AddGeneric(typeof(ICrudDomainService <>), typeof(CrudDomainService <>));
     containerAdapter.AddGeneric(typeof(ICrudAppService <>), typeof(CrudAppService <,>));
 }