Initial implementation

This commit is contained in:
Simon Gruber
2023-08-10 09:04:36 +02:00
commit 4c4ed48e38
95 changed files with 4142 additions and 0 deletions
@@ -0,0 +1,18 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
namespace Lookup.Database.Configurations;
internal class LookupConfiguration<TKey, TValue>
: IEntityTypeConfiguration<IKeyEntity<TKey, TValue>>
where TKey : class, IKeyEntity<TKey, TValue>
where TValue : class, IValueEntity<TKey, TValue>
{
/// <inheritdoc />
public void Configure(EntityTypeBuilder<IKeyEntity<TKey, TValue>> builder)
{
builder
.HasMany(e => e.Values)
.WithMany(e => e.Keys);
}
}