Skip to content

Commit

Permalink
Updated .NET 5.0, Finbuckle
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnCampionJr committed Jul 29, 2021
1 parent afebbe2 commit 654ed3c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
<TargetFrameworks>net5.0;netcoreapp3.1;netcoreapp2.1</TargetFrameworks>
<PackageTags>$(PackageBaseTags)</PackageTags>
<AssemblyName>Finbuckle.MultiTenant.MongoFramework</AssemblyName>
<Title>Finbuckle.MultiTenant.MongoFramework</Title>
Expand All @@ -11,7 +11,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Finbuckle.MultiTenant" Version="6.1.0" />
<PackageReference Include="Finbuckle.MultiTenant" Version="6.2.0" />
<PackageReference Include="MongoFramework" Version="0.25.0" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,20 @@ public static IServiceCollection AddMongoPerTenantConnection(
return AddMongoPerTenantConnection<IMongoPerTenantConnection, MongoPerTenantConnection>(serviceCollection, optionsAction, contextLifetime);
}

public static IServiceCollection AddMongoPerTenantConnection<TContext>(
public static IServiceCollection AddMongoPerTenantConnection<TConnection>(
this IServiceCollection serviceCollection,
Action<MongoPerTenantConnectionOptions> optionsAction = null,
ServiceLifetime contextLifetime = ServiceLifetime.Scoped)
where TContext : IMongoPerTenantConnection
where TConnection : IMongoPerTenantConnection
{
return AddMongoPerTenantConnection<IMongoPerTenantConnection, TContext>(serviceCollection, optionsAction, contextLifetime);
return AddMongoPerTenantConnection<IMongoPerTenantConnection, TConnection>(serviceCollection, optionsAction, contextLifetime);
}

public static IServiceCollection AddMongoPerTenantConnection<TContextService, TContextImplementation>(
public static IServiceCollection AddMongoPerTenantConnection<TConnectionService, TConnectionImplementation>(
this IServiceCollection serviceCollection,
Action<MongoPerTenantConnectionOptions> optionsAction = null,
ServiceLifetime contextLifetime = ServiceLifetime.Scoped)
where TContextImplementation : IMongoPerTenantConnection, TContextService
where TConnectionImplementation : IMongoPerTenantConnection, TConnectionService
{

Check.NotNull(serviceCollection, nameof(serviceCollection));
Expand All @@ -45,7 +45,7 @@ public static IServiceCollection AddMongoPerTenantConnection<TContextService, TC
});
}

serviceCollection.Add(new ServiceDescriptor(typeof(TContextService), typeof(TContextImplementation), contextLifetime));
serviceCollection.Add(new ServiceDescriptor(typeof(TConnectionService), typeof(TConnectionImplementation), contextLifetime));

return serviceCollection;
}
Expand Down

0 comments on commit 654ed3c

Please sign in to comment.