コード例 #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));
            }
        }
コード例 #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>();
        }
コード例 #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 <>));
 }
コード例 #4
0
 public void Configure(IContainerAdapter containerAdapter)
 {
     containerAdapter.AddGeneric(typeof(ICrudDomainService <>), typeof(CrudDomainService <>));
     containerAdapter.AddGeneric(typeof(ICrudAppService <>), typeof(CrudAppService <,>));
 }