Skip to content

Instantly share code, notes, and snippets.

@alimozdemir
Created May 30, 2020 15:47
Show Gist options
  • Save alimozdemir/aedb880b89cb879e1bdfb2be9372cc8c to your computer and use it in GitHub Desktop.
Save alimozdemir/aedb880b89cb879e1bdfb2be9372cc8c to your computer and use it in GitHub Desktop.
public void ConfigureServices(IServiceCollection services)
{
...
services.Scan(i =>
i.FromCallingAssembly()
.AddClasses(c => c.Where(i => i.IsClass && i.Name.EndsWith("BusinessService")))
.AsImplementedInterfaces()
.WithTransientLifetime()
);
...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment