-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MultiTenant entities - Get tenant from context only if there is any m…
…odified multitenant entity (#280) * MultiTenant entities - Get tenant from context only if there is any modified multitenant entity * MultiTenant entities - Get tenant from context only if there is any modified multitenant entity * MultiTenant entities - Get tenant from context only if there is any modified multitenant entity * MultiTenant entities - Get tenant from context only if there is any modified multitenant entity * MultiTenant entities - Get tenant from context only if there is any modified multitenant entity --------- Co-authored-by: Tudor Stanciu <tstanciu@totalsoft.ro>
- Loading branch information
Showing
6 changed files
with
82 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
test/UnitTests/Data/NBB.Data.EntityFramework.MultiTenancy.Tests/SimpleEntity.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// Copyright (c) TotalSoft. | ||
// This source code is licensed under the MIT license. | ||
|
||
namespace NBB.Data.EntityFramework.MultiTenancy.Tests | ||
{ | ||
public class SimpleEntity | ||
{ | ||
public int Id { get; set; } | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
test/UnitTests/Data/NBB.Data.EntityFramework.MultiTenancy.Tests/SimpleEntityConfiguration.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 Microsoft.EntityFrameworkCore; | ||
using Microsoft.EntityFrameworkCore.Metadata.Builders; | ||
|
||
namespace NBB.Data.EntityFramework.MultiTenancy.Tests | ||
{ | ||
public class SimpleEntityConfiguration : IEntityTypeConfiguration<SimpleEntity> | ||
{ | ||
public void Configure(EntityTypeBuilder<SimpleEntity> builder) | ||
{ | ||
builder.HasKey(x => x.Id); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters