/// <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)); } }
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>(); }
/// <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 <,>)); }