<commit_before>﻿using FilterLists.Data.Contexts;
using FilterLists.Data.Repositories.Contracts;
using FilterLists.Data.Repositories.Implementations;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;

namespace FilterLists.Data.DependencyInjection.Extensions
{
    public static class ConfigureServicesCollection
    {
        public static void AddFilterListsRepositories(this IServiceCollection services, IConfiguration configuration)
        {
            services.AddSingleton(c => configuration);
            services.AddEntityFrameworkMySql()
                .AddDbContext<FilterListsDbContext>(options =>
                    options.UseMySql(configuration.GetConnectionString("FilterListsConnection")));
            services.TryAddScoped<IListRepository, ListRepository>();
            services.TryAddScoped<ITableCsvRepository, TableCsvRepository>();
        }
    }
}<commit_msg>minor cleanup<commit_after>﻿using FilterLists.Data.Contexts;
using FilterLists.Data.Repositories.Contracts;
using FilterLists.Data.Repositories.Implementations;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;

namespace FilterLists.Data.DependencyInjection.Extensions
{
    public static class ConfigureServicesCollection
    {
        public static void AddFilterListsRepositories(this IServiceCollection services, IConfiguration configuration)
        {
            services.AddSingleton(c => configuration);
            services.AddEntityFrameworkMySql().AddDbContext<FilterListsDbContext>(options =>
                options.UseMySql(configuration.GetConnectionString("FilterListsConnection")));
            services.TryAddScoped<IListRepository, ListRepository>();
            services.TryAddScoped<ITableCsvRepository, TableCsvRepository>();
        }
    }
}
{'fraction_non_alphanumeric': 0.07703703703703704, 'fraction_numerical': 0.0, 'mean_word_length': 4.581267217630854, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5714737', 'n_tokens_mistral': 485, 'n_tokens_neox': 469, 'n_words': 74}