public static IServiceCollection AddRepositories(this IServiceCollection services, Type repositoryAssemblyType = null) { Assembly assembly = null; if (repositoryAssemblyType == null) { //assembly = Assembly.GetExecutingAssembly(); assembly = Assembly.GetEntryAssembly(); } else { assembly = repositoryAssemblyType.GetTypeInfo().Assembly; } return(RepositoryConfiguration.AddRepositories(services, assembly)); }