-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #177 from Brixel/bank-account-totals
feat: Added materialized view to hold bank account totals, and show them on bacnk accounts page
- Loading branch information
Showing
20 changed files
with
469 additions
and
96 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
namespace Persistence.Constants; | ||
|
||
public static class Schema | ||
{ | ||
public const string HaSpMan = "HaSpMan"; | ||
} |
18 changes: 18 additions & 0 deletions
18
Persistence/EntityConfigurations/BankAccountsWithTotalsConfiguration.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,18 @@ | ||
using Microsoft.EntityFrameworkCore; | ||
using Microsoft.EntityFrameworkCore.Metadata.Builders; | ||
|
||
using Persistence.Views; | ||
|
||
namespace Persistence.EntityConfigurations; | ||
|
||
public class BankAccountsWithTotalsConfiguration : IEntityTypeConfiguration<BankAccountsWithTotals> | ||
{ | ||
public void Configure(EntityTypeBuilder<BankAccountsWithTotals> builder) | ||
{ | ||
builder | ||
.ToView(BankAccountsWithTotals.ViewName) | ||
.HasKey(v => v.BankAccountId); | ||
|
||
builder.HasOne(p => p.Account).WithOne(); | ||
} | ||
} |
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
Oops, something went wrong.