Skip to content

Commit

Permalink
Added configuration extension to check for multi-tenancy (#217)
Browse files Browse the repository at this point in the history
  • Loading branch information
fraliv13 authored Mar 21, 2022
1 parent ce20c6e commit 56a214d
Showing 1 changed file with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// Copyright (c) TotalSoft.
// This source code is licensed under the MIT license.

using NBB.MultiTenancy.Abstractions.Options;

// ReSharper disable once CheckNamespace
namespace Microsoft.Extensions.Configuration
{
public static class DependencyInjectionExtensions
{
public static bool IsMultiTenant(this IConfiguration configuration)
{
return nameof(TenancyType.MultiTenant).Equals(configuration["MultiTenancy:TenancyType"], System.StringComparison.InvariantCultureIgnoreCase);
}
}
}

0 comments on commit 56a214d

Please sign in to comment.