Archived
Initial implementation
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user