public static DbContextOptionsBuilder <AppDbContext> UseOsDependentDbProvider(
            this DbContextOptionsBuilder <AppDbContext> builder,
            DatabaseSettings dbSettings)
        {
            if (builder == null)
            {
                throw new ArgumentNullException(nameof(builder));
            }

            if (dbSettings == null)
            {
                throw new ArgumentNullException(nameof(dbSettings));
            }

            var conStr = dbSettings.GetConnectionString();

            return(dbSettings.ShouldUseSqlServer() ?
                   builder.UseSqlServer(conStr, opts => opts.MigrationsAssembly(DB_MIGRATIONS_ASSEMBLY_NAME)) :
                   builder.UseSqlite(conStr, opts => opts.MigrationsAssembly(DB_MIGRATIONS_ASSEMBLY_NAME)));
        }