public static void AddRepositories(this IServiceCollection services, IConfiguration configuration, bool isDev) { services.AddDbContext <APINEXOSContext>(options => { options.UseSqlServer(HelperConnection.GetConnectionSQL(configuration, isDev), sqlOptions => { sqlOptions.EnableRetryOnFailure(3, TimeSpan.FromSeconds(30), null); sqlOptions.CommandTimeout(60); }); }); services.AddScoped(typeof(IBaseRepository <>), typeof(BaseRepository <>)); //services.AddTransient<IInvoiceRepository, InvoiceRepository>(); }