using System.Reflection; using GB5Shared.Hosting; namespace MarketingSL; public class MarketingModule : IModule { public void Register(IServiceCollection services, IConfiguration configuration) { var marketingBLLAssembly = Assembly.Load("MarketingBLL"); var marketingDALAssembly = Assembly.Load("MarketingDAL"); services.Scan(scan => scan .FromAssemblies(marketingBLLAssembly, marketingDALAssembly) .AddClasses(c => c.Where(t => !t.IsAbstract && !t.IsInterface && (t.Namespace == null || !t.Namespace.Contains(".DTO")))) .AsImplementedInterfaces() .WithScopedLifetime()); } public void MapEndpoints(WebApplication app) { } }