using System.Diagnostics.CodeAnalysis; using FruityFoundation.DataAccess.Abstractions; using Microsoft.Extensions.DependencyInjection; namespace FruityFoundation.DataAccess.Core; [ExcludeFromCodeCoverage(Justification = "Dependency injection helpers")] public static class ServiceCollectionExtensions { public static void AddDataAccessCore( this IServiceCollection services, Func> readWriteConnectionImplementationFactory, Func> readOnlyConnectionImplementationFactory ) { services.AddTransient>(readWriteConnectionImplementationFactory); services.AddTransient>(readOnlyConnectionImplementationFactory); services.AddSingleton(); } }